TokenParameters Class

  • java.lang.Object
    • com.microsoft.identity.client.TokenParameters

public class TokenParameters

Base class for AcquireTokenParameters and AcquireTokenSilentParameters

Constructor Summary

Constructor Description
TokenParameters(@NonNull final TokenParameters.Builder builder)

Method Summary

Modifier and Type Method and Description
IAccount getAccount()

Optional. If provided, will be used to force the session continuation. If user tries to sign in with a different account, error will be returned.

AccountRecord getAccountRecord()
AuthenticationScheme getAuthenticationScheme()

Gets the AuthenticationScheme.

String getAuthority()

Optional. Can be passed to override the default authority.

ClaimsRequest getClaimsRequest()

Optional. Can be passed into request specific claims in the id_token and access_token

String getCorrelationId()

Gets the correlation id passed to Token Parameters. If specified, MSAL will use this correlation id for the request instead of generating a new one.

List<String> getScopes()

The non-null array of scopes to be requested for the access token. MSAL always sends the scopes 'openid profile offline_access'. Do not include any of these scopes in the scope parameter.

Constructor Details

TokenParameters

protected TokenParameters(@NonNull final TokenParameters.Builder builder)

Parameters:

builder

Method Details

getAccount

public IAccount getAccount()

Optional. If provided, will be used to force the session continuation. If user tries to sign in with a different account, error will be returned.

getAccountRecord

public AccountRecord getAccountRecord()

getAuthenticationScheme

public AuthenticationScheme getAuthenticationScheme()

Gets the AuthenticationScheme.

Returns:

The AuthenticationScheme to get.

getAuthority

public String getAuthority()

Optional. Can be passed to override the default authority.

getClaimsRequest

public ClaimsRequest getClaimsRequest()

Optional. Can be passed into request specific claims in the id_token and access_token

getCorrelationId

public String getCorrelationId()

Gets the correlation id passed to Token Parameters. If specified, MSAL will use this correlation id for the request instead of generating a new one.

Returns:

a String representing the correlation id passed to TokenParameters

getScopes

public List getScopes()

The non-null array of scopes to be requested for the access token. MSAL always sends the scopes 'openid profile offline_access'. Do not include any of these scopes in the scope parameter.

Applies to