Dela via


AuthorizationCodeParameters Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.AuthorizationCodeParameters

Implements

com.microsoft.aad.msal4j.IAcquireTokenParameters

public class AuthorizationCodeParameters
implements com.microsoft.aad.msal4j.IAcquireTokenParameters

Object containing parameters for authorization code flow. Can be used as parameter to PublicClientApplication#acquireToken(AuthorizationCodeParameters) or to ConfidentialClientApplication#acquireToken(AuthorizationCodeParameters)

Method Summary

Modifier and Type Method and Description
@lombok.NonNull java.lang.String authorizationCode()

Authorization code acquired in the first step of OAuth2.0 authorization code flow.

static AuthorizationCodeParametersBuilder builder(String authorizationCode, URI redirectUri)

Builder for AuthorizationCodeParameters

ClaimsRequest claims()

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

java.lang.String codeVerifier()

Code verifier used for PKCE.

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.net.URI redirectUri()

Redirect URI registered in the Azure portal, and which was used in the first step of OAuth2.0 authorization code flow.

java.util.Set<java.lang.String> scopes()

Scopes to which the application is requesting access

java.lang.String tenant()

Overrides the tenant value in the authority URL for this request

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

authorizationCode

public @NonNull String authorizationCode()

Authorization code acquired in the first step of OAuth2.0 authorization code flow. For more details, see https://aka.ms/msal4j-authorization-code-flow

builder

public static AuthorizationCodeParameters.AuthorizationCodeParametersBuilder builder(String authorizationCode, URI redirectUri)

Builder for AuthorizationCodeParameters

Parameters:

authorizationCode - code received from the service authorization endpoint
redirectUri - URI where authorization code was received

Returns:

builder object that can be used to construct AuthorizationCodeParameters

claims

public ClaimsRequest claims()

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

codeVerifier

public String codeVerifier()

Code verifier used for PKCE. For more details, see https://tools.ietf.org/html/rfc7636

extraHttpHeaders

public Map extraHttpHeaders()

Adds additional headers to the token request

extraQueryParameters

public Map extraQueryParameters()

Adds additional query parameters to the token request

redirectUri

public @NonNull URI redirectUri()

Redirect URI registered in the Azure portal, and which was used in the first step of OAuth2.0 authorization code flow. For more details, see https://aka.ms/msal4j-authorization-code-flow

scopes

public Set scopes()

Scopes to which the application is requesting access

tenant

public String tenant()

Overrides the tenant value in the authority URL for this request

Applies to