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)

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 For more information, see PopParameters and https://aka.ms/msal4j-pop

SilentParametersBuilder scopes(@NonNull 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

Returns:

this.

authorityUrl

public SilentParameters.SilentParametersBuilder authorityUrl(String authorityUrl)

Authority for which the application is requesting tokens from.

Parameters:

authorityUrl

Returns:

this.

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

Returns:

this.

extraHttpHeaders

public SilentParameters.SilentParametersBuilder extraHttpHeaders(Map extraHttpHeaders)

Adds additional headers to the token request

Parameters:

extraHttpHeaders

Returns:

this.

extraQueryParameters

public SilentParameters.SilentParametersBuilder extraQueryParameters(Map extraQueryParameters)

Adds additional query parameters to the token request

Parameters:

extraQueryParameters

Returns:

this.

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

Returns:

this.

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(@NonNull Set scopes)

Scopes application is requesting access to.

Parameters:

scopes

Returns:

this.

tenant

public SilentParameters.SilentParametersBuilder tenant(String tenant)

Overrides the tenant value in the authority URL for this request

Parameters:

tenant

Returns:

this.

toString

public String toString()

Overrides:

SilentParameters.SilentParametersBuilder.toString()

Applies to