Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
DeviceCodeFlowParameters Class
- Package:
- com.microsoft.aad.msal4j
- Maven Artifact:
- com.microsoft.azure:msal4j:1.19.1
- java.lang.Object
- com.microsoft.aad.msal4j.DeviceCodeFlowParameters
Implements
public class DeviceCodeFlowParameters
implements com.microsoft.aad.msal4j.IAcquireTokenParameters
Object containing parameters for device code flow. Can be used as parameter to acquireToken(DeviceCodeFlowParameters parameters). For more details, see https://aka.ms/msal4j-device-code
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static DeviceCodeFlowParametersBuilder |
builder(Set<String> scopes, Consumer<DeviceCode> deviceCodeConsumer)
Builder for DeviceCodeFlowParameters |
| ClaimsRequest |
claims()
Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims |
| @lombok.NonNull java.util.function.Consumer<DeviceCode> |
deviceCodeConsumer()
Receives the device code returned from the first step of Oauth2.0 device code flow. |
| java.util.Map<java.lang.String,java.lang.String> |
extraHttpHeaders()
Adds additional headers to the token request |
| java.util.Map<java.lang.String,java.lang.String> |
extraQueryParameters()
Adds additional query parameters to the token request |
| @lombok.NonNull java.util.Set<java.lang.String> |
scopes()
Scopes to which the application is requesting access to. |
| java.lang.String |
tenant()
Overrides the tenant value in the authority URL for this request |
Methods inherited from java.lang.Object
Method Details
builder
public static DeviceCodeFlowParameters.DeviceCodeFlowParametersBuilder builder(Set<String> scopes, Consumer<DeviceCode> deviceCodeConsumer)
Builder for DeviceCodeFlowParameters
Parameters:
Returns:
claims
public ClaimsRequest claims()
Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims
deviceCodeConsumer
public @NonNull 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
extraHttpHeaders
public Map<String,String> extraHttpHeaders()
Adds additional headers to the token request
extraQueryParameters
public Map<String,String> extraQueryParameters()
Adds additional query parameters to the token request
scopes
public @NonNull Set<String> scopes()
Scopes to which the application is requesting access to.
tenant
public String tenant()
Overrides the tenant value in the authority URL for this request
