DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder

public static class DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder

Method Summary

Modifier and Type Method and Description
DeviceCodeFlowParameters build()
DeviceCodeFlowParametersBuilder claims(ClaimsRequest claims)

Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims

DeviceCodeFlowParametersBuilder deviceCodeConsumer(Consumer<DeviceCode> deviceCodeConsumer)

Receives the device code returned from the first step of Oauth2.0 device code flow.

DeviceCodeFlowParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)

Adds additional headers to the token request

DeviceCodeFlowParametersBuilder extraQueryParameters(Map<String,String> extraQueryParameters)

Deprecated

Not recommended for production scenarios. It will be removed in a future release, and the behavior may be replaced by a new API.

Adds additional query parameters to the token request

DeviceCodeFlowParametersBuilder scopes(Set<String> scopes)

Scopes to which the application is requesting access to.

DeviceCodeFlowParametersBuilder tenant(String tenant)

Overrides the tenant value in the authority URL for this request

java.lang.String toString()

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

build

public DeviceCodeFlowParameters build()

claims

public DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder claims(ClaimsRequest claims)

Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims

Parameters:

claims

deviceCodeConsumer

public DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder deviceCodeConsumer(Consumer<DeviceCode> deviceCodeConsumer)

Receives the device code returned from the first step of Oauth2.0 device code flow. The DeviceCode#verificationUri and the DeviceCode#userCode should be shown to the end user.

For more details, see https://aka.ms/msal4j-device-code

Cannot be null.

Parameters:

deviceCodeConsumer

extraHttpHeaders

public DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)

Adds additional headers to the token request

Parameters:

extraHttpHeaders

extraQueryParameters


public DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder extraQueryParameters(Map<String,String> extraQueryParameters)

Deprecated

Not recommended for production scenarios. It will be removed in a future release, and the behavior may be replaced by a new API.

Adds additional query parameters to the token request

Parameters:

extraQueryParameters

scopes

public DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder scopes(Set<String> scopes)

Scopes to which the application is requesting access to.

Cannot be null.

Parameters:

scopes

tenant

public DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder tenant(String tenant)

Overrides the tenant value in the authority URL for this request

Parameters:

tenant

toString

public String toString()

Overrides:

DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder.toString()

Applies to