Partager via


InteractiveRequestParameters Class

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

Implements

com.microsoft.aad.msal4j.IAcquireTokenParameters

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

Object containing parameters for interactive requests. Can be used as parameter to acquireToken(InteractiveRequestParameters parameters).

For more details, see https://aka.ms/msal4j-interactive-request.

Method Summary

Modifier and Type Method and Description
static InteractiveRequestParametersBuilder builder(URI redirectUri)
ClaimsRequest claims()

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

java.lang.String claimsChallenge()
java.lang.String domainHint()

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

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

int httpPollingTimeoutInSeconds()

The amount of time in seconds that the library will wait for an authentication result.

boolean instanceAware()

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.

java.lang.String loginHint()

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.

Prompt prompt()

Indicate the type of user interaction that is required.

PopParameters proofOfPossession()
@lombok.NonNull java.net.URI redirectUri()

Redirect URI where MSAL will listen to for the authorization code returned by Azure AD.

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

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

SystemBrowserOptions systemBrowserOptions()

Sets SystemBrowserOptions to be used by the PublicClientApplication

java.lang.String tenant()

Overrides the tenant value in the authority URL for this request

long windowHandle()

The parent window handle used to open UI elements with the correct parent For browser scenarios and Windows console applications, this value should not need to be set For Windows console applications, MSAL Java will attempt to discover the console's window handle if this parameter is not set For scenarios where MSAL Java is responsible for opening UI elements (such as when using MSALRuntime), this parameter is required and an exception will be thrown if not set

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

builder

public static InteractiveRequestParameters.InteractiveRequestParametersBuilder builder(URI redirectUri)

Parameters:

redirectUri

claims

public ClaimsRequest claims()

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

claimsChallenge

public String claimsChallenge()

domainHint

public String domainHint()

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.

extraHttpHeaders

public Map extraHttpHeaders()

Adds additional headers to the token request

extraQueryParameters

public Map extraQueryParameters()

Adds additional query parameters to the token request

httpPollingTimeoutInSeconds

public int httpPollingTimeoutInSeconds()

The amount of time in seconds that the library will wait for an authentication result. 120 seconds is the default timeout, unless overridden here with some other positive integer If this timeout is set to 0 or less it will be ignored, and the library will use a 1 second timeout instead

instanceAware

public boolean instanceAware()

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.

loginHint

public String loginHint()

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.

prompt

public Prompt prompt()

Indicate the type of user interaction that is required.

proofOfPossession

public PopParameters proofOfPossession()

redirectUri

public @NonNull URI redirectUri()

Redirect URI where MSAL will listen to for the authorization code returned by Azure AD. Should be a loopback address with a port specified (for example, http://localhost:3671). If no port is specified, MSAL will find an open port. For more information, see https://aka.ms/msal4j-interactive-request.

scopes

public Set scopes()

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

systemBrowserOptions

public SystemBrowserOptions systemBrowserOptions()

Sets SystemBrowserOptions to be used by the PublicClientApplication

tenant

public String tenant()

Overrides the tenant value in the authority URL for this request

windowHandle

public long windowHandle()

The parent window handle used to open UI elements with the correct parent For browser scenarios and Windows console applications, this value should not need to be set For Windows console applications, MSAL Java will attempt to discover the console's window handle if this parameter is not set For scenarios where MSAL Java is responsible for opening UI elements (such as when using MSALRuntime), this parameter is required and an exception will be thrown if not set

Applies to