SilentParameters Class

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

Implements

com.microsoft.aad.msal4j.IAcquireTokenParameters

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

Object containing parameters for silent requests. Can be used as parameter to acquireTokenSilently(SilentParameters parameters) or to ConfidentialClientApplication#acquireTokenSilently(SilentParameters)

Method Summary

Modifier and Type Method and Description
IAccount account()

Account for which you are requesting a token for.

java.lang.String authorityUrl()

Authority for which the application is requesting tokens from.

static SilentParametersBuilder builder(Set<String> scopes)

Deprecated

This method was used for using cached tokens in client credentials or On-behalf-of flow. Those flows will now by default attempt to use cached the cached tokens, so there is no need to call acquireTokenSilently. This overload will be removed in the next major version.

Builder for SilentParameters

static SilentParametersBuilder builder(Set<String> scopes, IAccount account)

Builder for SilentParameters

ClaimsRequest claims()

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

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

boolean forceRefresh()

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

PopParameters proofOfPossession()
@lombok.NonNull java.util.Set<java.lang.String> scopes()

Scopes application is requesting access to.

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

account

public IAccount account()

Account for which you are requesting a token for.

authorityUrl

public String authorityUrl()

Authority for which the application is requesting tokens from.

builder

public static SilentParameters.SilentParametersBuilder builder(Set scopes)

Deprecated

This method was used for using cached tokens in client credentials or On-behalf-of flow. Those flows will now by default attempt to use cached the cached tokens, so there is no need to call acquireTokenSilently. This overload will be removed in the next major version.

Builder for SilentParameters

Parameters:

scopes - scopes application is requesting access to

Returns:

builder object that can be used to construct SilentParameters

builder

public static SilentParameters.SilentParametersBuilder builder(Set scopes, IAccount account)

Builder for SilentParameters

Parameters:

scopes - scopes application is requesting access to
account - IAccount for which to acquire a token for

Returns:

builder object that can be used to construct SilentParameters

claims

public ClaimsRequest claims()

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

extraHttpHeaders

public Map extraHttpHeaders()

Adds additional headers to the token request

extraQueryParameters

public Map extraQueryParameters()

Adds additional query parameters to the token request

forceRefresh

public boolean forceRefresh()

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

proofOfPossession

public PopParameters proofOfPossession()

scopes

public @NonNull Set scopes()

Scopes application is requesting access to.

tenant

public String tenant()

Overrides the tenant value in the authority URL for this request

Applies to