SilentParameters.SilentParametersBuilder Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.SilentParameters.SilentParametersBuilder

public static class SilentParameters.SilentParametersBuilder

Method Summary

Modifier and Type Method and Description
SilentParametersBuilder account(IAccount account)

Account for which you are requesting a token for.

SilentParametersBuilder authorityUrl(String authorityUrl)

Authority for which the application is requesting tokens from.

SilentParameters build()
SilentParametersBuilder claims(ClaimsRequest claims)

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

SilentParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)

Adds additional headers to the token request

SilentParametersBuilder 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

SilentParametersBuilder forceRefresh(boolean forceRefresh)

Force MSAL to refresh the tokens in the cache, even if there is a valid access token.

SilentParametersBuilder proofOfPossession(HttpMethod httpMethod, URI uri, String nonce)

Sets the PopParameters for this request, allowing the request to retrieve proof-of-possession tokens rather than bearer tokens

SilentParametersBuilder scopes(Set<String> scopes)

Scopes application is requesting access to.

SilentParametersBuilder 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

account

public SilentParameters.SilentParametersBuilder account(IAccount account)

Account for which you are requesting a token for.

Parameters:

account

authorityUrl

public SilentParameters.SilentParametersBuilder authorityUrl(String authorityUrl)

Authority for which the application is requesting tokens from.

Parameters:

authorityUrl

build

public SilentParameters build()

claims

public SilentParameters.SilentParametersBuilder claims(ClaimsRequest claims)

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

Parameters:

claims

extraHttpHeaders

public SilentParameters.SilentParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)

Adds additional headers to the token request

Parameters:

extraHttpHeaders

extraQueryParameters


public SilentParameters.SilentParametersBuilder 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

forceRefresh

public SilentParameters.SilentParametersBuilder forceRefresh(boolean forceRefresh)

Force MSAL to refresh the tokens in the cache, even if there is a valid access token.

Parameters:

forceRefresh

proofOfPossession

public SilentParameters.SilentParametersBuilder proofOfPossession(HttpMethod httpMethod, URI uri, String nonce)

Sets the PopParameters for this request, allowing the request to retrieve proof-of-possession tokens rather than bearer tokens

For more information, see PopParameters and https://aka.ms/msal4j-pop

Parameters:

httpMethod - a valid HTTP method, such as "GET" or "POST"
uri - URI to associate with the token
nonce - optional nonce value for the token, can be empty or null

scopes

public SilentParameters.SilentParametersBuilder scopes(Set<String> scopes)

Scopes application is requesting access to.

Cannot be null.

Parameters:

scopes

tenant

public SilentParameters.SilentParametersBuilder tenant(String tenant)

Overrides the tenant value in the authority URL for this request

Parameters:

tenant

toString

public String toString()

Overrides:

SilentParameters.SilentParametersBuilder.toString()

Applies to