共用方式為


AuthorizationRequestUrlParameters.Builder Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.AuthorizationRequestUrlParameters.Builder

public static class AuthorizationRequestUrlParameters.Builder

Constructor Summary

Constructor Description
Builder()

Method Summary

Modifier and Type Method and Description
AuthorizationRequestUrlParameters build()
Builder claims(ClaimsRequest val)

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

Builder claimsChallenge(String val)

In cases where Azure AD tenant admin has enabled conditional access policies, and the policy has not been met,MsalServiceException will contain claims that need be consented to.

Builder codeChallenge(String val)

Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE).

Builder codeChallengeMethod(String val)

The method used to encode the code verifier for the code challenge parameter.

Builder correlationId(String val)

Identifier used to correlate requests for telemetry purposes.

Builder domainHint(String val)

Provides a hint about the tenant or domain that the user should use to sign in.

Builder extraQueryParameters(Map<String,String> val)

Query parameters that you can add to the request, in addition to the list of parameters already provided.

Builder extraScopesToConsent(Set<String> val)

Scopes that you can request the end user to consent upfront, in addition to scopes which the application is requesting access to.

Builder instanceAware(boolean val)

If set to true, the authorization result will contain the authority for the user's home cloud, and this authority will be used for the token request instead of the authority set in the application.

Builder loginHint(String val)

Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time.

Builder nonce(String val)

A value included in the request that is also returned in the token response.

Builder prompt(Prompt val)

Indicates the type of user interaction that is required.

Builder redirectUri(String val)

The redirect URI where authentication responses can be received by your application.

Builder responseMode(ResponseMode val)

Specifies the method that should be used to send the authentication result to your app.

Builder scopes(Set<String> val)

Scopes which the application is requesting access to and the user will consent to.

Builder state(String val)

A value included in the request that is also returned in the token response.

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

Constructor Details

Builder

public Builder()

Method Details

build

public AuthorizationRequestUrlParameters build()

claims

public AuthorizationRequestUrlParameters.Builder claims(ClaimsRequest val)

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

Parameters:

val

claimsChallenge

public AuthorizationRequestUrlParameters.Builder claimsChallenge(String val)

In cases where Azure AD tenant admin has enabled conditional access policies, and the policy has not been met,MsalServiceException will contain claims that need be consented to.

Parameters:

val

codeChallenge

public AuthorizationRequestUrlParameters.Builder codeChallenge(String val)

Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). Required if codeChallenge is included. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636

Parameters:

val

codeChallengeMethod

public AuthorizationRequestUrlParameters.Builder codeChallengeMethod(String val)

The method used to encode the code verifier for the code challenge parameter. Can be one of plain or S256. If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636

Parameters:

val

correlationId

public AuthorizationRequestUrlParameters.Builder correlationId(String val)

Identifier used to correlate requests for telemetry purposes. Usually a GUID.

Parameters:

val

domainHint

public AuthorizationRequestUrlParameters.Builder domainHint(String val)

Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant.

Parameters:

val

extraQueryParameters

public AuthorizationRequestUrlParameters.Builder extraQueryParameters(Map val)

Query parameters that you can add to the request, in addition to the list of parameters already provided.

Parameters:

val

extraScopesToConsent

public AuthorizationRequestUrlParameters.Builder extraScopesToConsent(Set val)

Scopes that you can request the end user to consent upfront, in addition to scopes which the application is requesting access to.

Parameters:

val

instanceAware

public AuthorizationRequestUrlParameters.Builder instanceAware(boolean val)

If set to true, the authorization result will contain the authority for the user's home cloud, and this authority will be used for the token request instead of the authority set in the application.

Parameters:

val

loginHint

public AuthorizationRequestUrlParameters.Builder loginHint(String val)

Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim.

Parameters:

val

nonce

public AuthorizationRequestUrlParameters.Builder nonce(String val)

A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks.

Parameters:

val

prompt

public AuthorizationRequestUrlParameters.Builder prompt(Prompt val)

Indicates the type of user interaction that is required. Possible values are Prompt

Parameters:

val

redirectUri

public AuthorizationRequestUrlParameters.Builder redirectUri(String val)

The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.

Parameters:

val

responseMode

public AuthorizationRequestUrlParameters.Builder responseMode(ResponseMode val)

Specifies the method that should be used to send the authentication result to your app.

Parameters:

val

scopes

public AuthorizationRequestUrlParameters.Builder scopes(Set val)

Scopes which the application is requesting access to and the user will consent to.

Parameters:

val

state

public AuthorizationRequestUrlParameters.Builder state(String val)

A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred.

Parameters:

val

Applies to