AuthenticationContext Class
- java.
lang. Object - com.
microsoft. aad. adal. AuthenticationContext
- com.
public class AuthenticationContext
ADAL context to get access token, refresh token, and lookup from cache.
Constructor Summary
Constructor | Description |
---|---|
AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore) |
It will verify the authority and use the given cache. If cache is null, it will not use cache. |
AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority) |
Constructs context to use with known authority to get the token. It uses default cache that stores encrypted tokens. |
AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore) |
Constructs context to use with known authority to get the token. It uses provided cache. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI if activitycontext is not null. Default is AUTO. |
void |
acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If PromptBehavior is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO. if PromptBehavior is Always, it will display prompt screen. |
void |
acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI if activitycontext is not null. Default is AUTO. |
void |
acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use the refresh token if available. If it fails to get token with refresh token, it will remove this refresh token from cache and fall back on the UI. |
void |
acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, it will remove this refresh token from cache and start authentication. |
void |
acquireToken(final Activity activity, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start an interactive auth flow to acquire new tokens with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed. |
void |
acquireToken(final IWindowComponent fragment, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
acquireToken will start an interactive auth flow to acquire new tokens with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed. |
void |
acquireToken(final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback<AuthenticationResult> callback)
acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the AuthenticationCallback<T> and can be used to call the specified protected resource. Bypasses token cache if |
void |
acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
It will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO. |
void |
acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the AuthenticationCallback<T> and can be used to call the specified protected resource. By default, acquireToken will attempt to fulfill the request silently, and perform an interactive login if needed or explicitly specified in the request. This overload uses an [AlertDialog](https://developer.android.com/guide/topics/ui/dialogs) when user interaction is required. This overload does not support any flow requiring a [token broker](https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker). |
void |
acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
acquire token using refresh token if cache is not used. Otherwise, use acquireToken to let the ADAL handle the cache lookup and refresh token request.
|
void |
acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
acquire token using refresh token if cache is not used. Otherwise, use acquireToken to let the ADAL handle the cache lookup and refresh token request.
|
Future<Authentication |
acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
|
void |
acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception |
void |
acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception |
void |
acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception |
void |
acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
This function tries to acquire token silently. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. If both RT and AT are not present, then it will use the provided assertion and its type to acquire the same. This method will not show UI for the user. If prompt is needed, the method will return an exception |
Authentication |
acquireTokenSilentSync(String resource, String clientId, String userId)
This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception |
Authentication |
acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception |
Authentication |
acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception |
Authentication |
acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
This function tries to acquire token silently. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. If both RT and AT are not present, then it will use the provided assertion and its type to acquire the same. This method will not show UI for the user. If prompt is needed, the method will return an exception |
boolean |
cancelAuthenticationActivity(final int requestId)
Active authentication activity can be cancelled if it exists. It may not be cancelled if activity is not launched yet. RequestId is the hashcode of your AuthenticationCallback. |
String |
getAuthority()
Gets authority that is used for this object of AuthenticationContext. |
String |
getBrokerUser()
Gets username for current broker user. |
User |
getBrokerUsers()
Gets user info from broker. This should not be called on main thread. |
IToken |
getCache()
Returns referenced cache. You can use default cache, which uses SharedPreferencesFileManager and handles synchronization by itself. |
List<String> | getClientCapabilites() |
boolean |
getExtendedLifetimeEnabled()
Gets if the ExtendedLifetime mode is enabled. |
String |
getRedirectUriForBroker()
Get expected redirect Uri for your app to use in broker. You need to register this redirectUri in order to get token from Broker. |
UUID |
getRequestCorrelationId()
Get the CorrelationId set by user. |
boolean | getValidateAuthority() |
String |
getVersionName()
Version name for ADAL not for the app itself. |
String |
mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
Util method to merge Sample input claim :
Sample capabilities list : [CP1, CP2 CP3]
Output merged claims : { "userinfo": { "given_name": { "essential": true }, "email": { "essential": true } }, "id_token": { "auth_time": { "essential": true } }, "access_token": { "xms_cc": { "values": ["CP1", "CP2"] } } }* |
void |
onActivityResult(final int requestCode, final int resultCode, final Intent data)
This method wraps the implementation for onActivityResult at the related Activity class. This method is called at UI thread. |
void | setClientCapabilites(List<String> clientCapabilites) |
void |
setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
The client need to set the flag to true explicitly to enable the ExtendedLifetime mode The default value of flag is false. ADAL will return the stale token when ExtendedLifetime mode is enabled and the server is down |
void |
setRequestCorrelationId(final UUID requestCorrelationId)
Set CorrelationId to requests. |
Constructor Details
AuthenticationContext
public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
It will verify the authority and use the given cache. If cache is null, it will not use cache.
Parameters:
Context
AuthenticationContext
public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
Constructs context to use with known authority to get the token. It uses default cache that stores encrypted tokens.
Parameters:
AuthenticationContext
public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
Constructs context to use with known authority to get the token. It uses provided cache.
Parameters:
Context
Method Details
acquireToken
public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI if activitycontext is not null. Default is AUTO.
Parameters:
acquireToken
public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If PromptBehavior is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO. if PromptBehavior is Always, it will display prompt screen.
Parameters:
acquireToken
public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI if activitycontext is not null. Default is AUTO.
Parameters:
acquireToken
public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use the refresh token if available. If it fails to get token with refresh token, it will remove this refresh token from cache and fall back on the UI.
Parameters:
acquireToken
public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback
acquireToken will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, it will remove this refresh token from cache and start authentication.
Parameters:
acquireToken
public void acquireToken(final Activity activity, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback
acquireToken will start an interactive auth flow to acquire new tokens with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed.
Parameters:
acquireToken
public void acquireToken(final IWindowComponent fragment, final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback
acquireToken will start an interactive auth flow to acquire new tokens with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed.
Parameters:
acquireToken
public void acquireToken(final String resource, final String clientId, @Nullable String redirectUri, @Nullable final String loginHint, @Nullable final PromptBehavior prompt, @Nullable String extraQueryParameters, @Nullable final String claims, final AuthenticationCallback
acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the AuthenticationCallback<T> and can be used to call the specified protected resource. Bypasses token cache if
Parameters:
acquireToken
public void acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback
It will start interactive flow if needed. It checks the cache to return existing result if not expired. It tries to use refresh token if available. If it fails to get token with refresh token, behavior will depend on options. If promptbehavior is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO.
Parameters:
acquireToken
public void acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback
acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the AuthenticationCallback<T> and can be used to call the specified protected resource. By default, acquireToken will attempt to fulfill the request silently, and perform an interactive login if needed or explicitly specified in the request. This overload uses an [AlertDialog](https://developer.android.com/guide/topics/ui/dialogs) when user interaction is required. This overload does not support any flow requiring a [token broker](https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker).
Parameters:
acquireTokenByRefreshToken
public void acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback
acquire token using refresh token if cache is not used. Otherwise, use acquireToken to let the ADAL handle the cache lookup and refresh token request.
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="AuthenticationContext#acquireTokenByRefreshToken(String, String, AuthenticationCallback)"></xref> will be removed from the next major release. We don't recommend developers taking dependency on refresh token, ADAL will handle the cache lookup, and refresh the RT if necessary. </p>
</xrefdescription>
Parameters:
acquireTokenByRefreshToken
public void acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback
acquire token using refresh token if cache is not used. Otherwise, use acquireToken to let the ADAL handle the cache lookup and refresh token request.
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="AuthenticationContext#acquireTokenByRefreshToken(String, String, AuthenticationCallback)"></xref> will be removed from the next major release. We don't recommend developers taking dependency on refresh token, ADAL will handle the cache lookup, and refresh the RT if necessary. </p>
</xrefdescription>
Parameters:
acquireTokenSilent
public Future
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>Use the <xref uid="com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,AuthenticationCallback<AuthenticationResult>)" data-throw-if-not-resolved="false" data-raw-source="acquireTokenSilentAsync"></xref> method. </p>
</xrefdescription>
Parameters:
Returns:
acquireTokenSilentAsync
public void acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
acquireTokenSilentAsync
public void acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
acquireTokenSilentAsync
public void acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback
The function will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
acquireTokenSilentAsyncWithAssertion
public void acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback
This function tries to acquire token silently. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. If both RT and AT are not present, then it will use the provided assertion and its type to acquire the same. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
acquireTokenSilentSync
public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId)
This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
Returns:
Throws:
acquireTokenSilentSync
public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
Returns:
Throws:
acquireTokenSilentSync
public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
This is sync function. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
Returns:
Throws:
acquireTokenSilentSyncWithAssertion
public AuthenticationResult acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
This function tries to acquire token silently. It will first look at the cache and automatically checks for the token expiration. Additionally, if no suitable access token is found in the cache, but refresh token is available, the function will use the refresh token automatically. If both RT and AT are not present, then it will use the provided assertion and its type to acquire the same. This method will not show UI for the user. If prompt is needed, the method will return an exception
Parameters:
Returns:
Throws:
cancelAuthenticationActivity
public boolean cancelAuthenticationActivity(final int requestId)
Active authentication activity can be cancelled if it exists. It may not be cancelled if activity is not launched yet. RequestId is the hashcode of your AuthenticationCallback.
Parameters:
Returns:
Throws:
getAuthority
public String getAuthority()
Gets authority that is used for this object of AuthenticationContext.
Returns:
getBrokerUser
public String getBrokerUser()
Gets username for current broker user.
Returns:
getBrokerUsers
public UserInfo [] getBrokerUsers()
Gets user info from broker. This should not be called on main thread.
Returns:
Throws:
getCache
public ITokenCacheStore getCache()
Returns referenced cache. You can use default cache, which uses SharedPreferencesFileManager and handles synchronization by itself.
Returns:
getClientCapabilites
public List
getExtendedLifetimeEnabled
public boolean getExtendedLifetimeEnabled()
Gets if the ExtendedLifetime mode is enabled.
Returns:
getRedirectUriForBroker
public String getRedirectUriForBroker()
Get expected redirect Uri for your app to use in broker. You need to register this redirectUri in order to get token from Broker.
Returns:
getRequestCorrelationId
public UUID getRequestCorrelationId()
Get the CorrelationId set by user.
Returns:
getValidateAuthority
public boolean getValidateAuthority()
Returns:
getVersionName
public static String getVersionName()
Version name for ADAL not for the app itself.
Returns:
mergeClaimsWithClientCapabilities
public static String mergeClaimsWithClientCapabilities(final String claims, final List
Util method to merge
Sample input claim :{
"userinfo": { "given_name": {"essential": true}, "email": {"essential": true}, }, "id_token": { "auth_time": {"essential": true}, }
}
Sample capabilities list : [CP1, CP2 CP3]
Output merged claims : { "userinfo": { "given_name": { "essential": true }, "email": { "essential": true } }, "id_token": { "auth_time": { "essential": true } }, "access_token": { "xms_cc": { "values": ["CP1", "CP2"] } } }*
Parameters:
Returns:
Throws:
onActivityResult
public void onActivityResult(final int requestCode, final int resultCode, final Intent data)
This method wraps the implementation for onActivityResult at the related Activity class. This method is called at UI thread.
Parameters:
Intent
setClientCapabilites
public void setClientCapabilites(List
Parameters:
setExtendedLifetimeEnabled
public void setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
The client need to set the flag to true explicitly to enable the ExtendedLifetime mode The default value of flag is false. ADAL will return the stale token when ExtendedLifetime mode is enabled and the server is down
Parameters:
setRequestCorrelationId
public void setRequestCorrelationId(final UUID requestCorrelationId)
Set CorrelationId to requests.
Parameters:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for