AuthenticationResultMetadata.AuthenticationResultMetadataBuilder Class
- java.
lang. Object - com.
microsoft. aad. msal4j. AuthenticationResultMetadata. AuthenticationResultMetadataBuilder
- com.
public static class AuthenticationResultMetadata.AuthenticationResultMetadataBuilder
Modifier and Type | Method and Description |
---|---|
Authentication |
build() |
Authentication |
cache Specifies the reason for refreshing the access token, see CacheRefreshReason for possible values. |
Authentication |
refresh When the token should be proactively refreshed. |
Authentication |
token The source of the tokens in the AuthenticationResult, see TokenSource for possible values |
java.lang.String |
to |
build
public AuthenticationResultMetadata build()
cacheRefreshReason
public AuthenticationResultMetadata.AuthenticationResultMetadataBuilder cacheRefreshReason(CacheRefreshReason cacheRefreshReason)
Specifies the reason for refreshing the access token, see CacheRefreshReason for possible values. Will be NOT_APPLICABLE if the token was returned from the cache or if the API used to fetch the token does not attempt to read the cache.
Parameters:
Returns:
this
.refreshOn
public AuthenticationResultMetadata.AuthenticationResultMetadataBuilder refreshOn(Long refreshOn)
When the token should be proactively refreshed. May be null or 0 if proactive refresh is not used
Parameters:
Returns:
this
.tokenSource
public AuthenticationResultMetadata.AuthenticationResultMetadataBuilder tokenSource(TokenSource tokenSource)
The source of the tokens in the AuthenticationResult, see TokenSource for possible values
Parameters:
Returns:
this
.toString
public String toString()
Overrides:
AuthenticationResultMetadata.AuthenticationResultMetadataBuilder.toString()