azure-docs-sdk-java/docs-ref-autogen/com.microsoft.aad.adal.Auth...

1025 строки
89 KiB
YAML

### YamlMime:JavaType
constructors:
- fullName: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
name: AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
nameWithType: AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
parameters:
- description: >-
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="Context"></xref>
</p>
name: appContext
type: <xref href="%40NonNull+final+Context?alt=%40NonNull+final+Context&text=%40NonNull+final+Context" data-throw-if-not-resolved="False"/>
- description: <p>Authority Url </p>
name: authority
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>Cache <xref uid="com.microsoft.aad.adal.ITokenCacheStore" data-throw-if-not-resolved="false" data-raw-source="ITokenCacheStore"></xref> used to store tokens. Set to null if you don't want cache. </p>
name: tokenCacheStore
type: '@Nullable final <xref href="com.microsoft.aad.adal.ITokenCacheStore?alt=com.microsoft.aad.adal.ITokenCacheStore&text=ITokenCacheStore" data-throw-if-not-resolved="False"/>'
summary: >-
<p>It will verify the authority and use the given cache. If cache is null, it will not use cache.</p>
<p></p>
syntax: public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, @Nullable final ITokenCacheStore tokenCacheStore)
uid: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context,@NonNull final String,@Nullable final ITokenCacheStore)
- fullName: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
name: AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
nameWithType: AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
parameters:
- description: <p>It needs to have handle to the <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Context"></xref> to use the SharedPreferencesFileManager as a Default cache storage. It does not need to be activity. </p>
name: appContext
type: <xref href="%40NonNull+final+Context?alt=%40NonNull+final+Context&text=%40NonNull+final+Context" data-throw-if-not-resolved="False"/>
- description: <p>Authority url to send code and token requests </p>
name: authority
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>validate authority before sending token request </p>
name: validateAuthority
type: <xref href="final+boolean?alt=final+boolean&text=final+boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>Constructs context to use with known authority to get the token. It uses default cache that stores encrypted tokens.</p>
<p></p>
syntax: public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority)
uid: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context,@NonNull final String,final boolean)
- fullName: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
name: AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
nameWithType: AuthenticationContext.AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
parameters:
- description: >-
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="Context"></xref>
</p>
name: appContext
type: <xref href="%40NonNull+final+Context?alt=%40NonNull+final+Context&text=%40NonNull+final+Context" data-throw-if-not-resolved="False"/>
- description: <p>Authority Url </p>
name: authority
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>true/false for validation </p>
name: validateAuthority
type: <xref href="final+boolean?alt=final+boolean&text=final+boolean" data-throw-if-not-resolved="False"/>
- description: <p>Set to null if you don't want cache. </p>
name: tokenCacheStore
type: '@Nullable final <xref href="com.microsoft.aad.adal.ITokenCacheStore?alt=com.microsoft.aad.adal.ITokenCacheStore&text=ITokenCacheStore" data-throw-if-not-resolved="False"/>'
summary: >-
<p>Constructs context to use with known authority to get the token. It uses provided cache.</p>
<p></p>
syntax: public AuthenticationContext(@NonNull final Context appContext, @NonNull final String authority, final boolean validateAuthority, @Nullable final ITokenCacheStore tokenCacheStore)
uid: com.microsoft.aad.adal.AuthenticationContext.AuthenticationContext(@NonNull final Context,@NonNull final String,final boolean,@Nullable final ITokenCacheStore)
inheritances:
- <xref href="java.lang.Object" data-throw-if-not-resolved="False"/>
methods:
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. <xref uid="com.microsoft.aad.adal.PromptBehavior" data-throw-if-not-resolved="false" data-raw-source="PromptBehavior"></xref> added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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 <xref uid="com.microsoft.aad.adal.PromptBehavior" data-throw-if-not-resolved="false" data-raw-source="PromptBehavior"></xref> is AUTO, it will remove this refresh token from cache and fall back on the UI. Default is AUTO. if <xref uid="com.microsoft.aad.adal.PromptBehavior" data-throw-if-not-resolved="false" data-raw-source="PromptBehavior"></xref> is Always, it will display prompt screen.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable PromptBehavior prompt, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable PromptBehavior,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. This parameter will be used to pre-populate the username field in the authentication form. Please note that the end user can still edit the username field and authenticate as a different user. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. The parameter can be null. </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable String,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required to launch authentication activity. </p>
name: activity
type: <xref href="Activity?alt=Activity&text=Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use package name info if not provided. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>login hint (optional if validateAuthority == false) </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: public void acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(Activity,String,String,@Nullable String,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.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)
name: 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)
nameWithType: AuthenticationContext.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)
parameters:
- description: <p>Calling activity </p>
name: activity
type: <xref href="final+Activity?alt=final+Activity&text=final+Activity" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable final <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: 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<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final Activity,final String,final String,@Nullable String,@Nullable final String,@Nullable final PromptBehavior,@Nullable String,@Nullable final String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.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)
name: 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)
nameWithType: AuthenticationContext.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)
parameters:
- description: <p>It accepts both type of fragments. </p>
name: fragment
type: final <xref href="com.microsoft.aad.adal.IWindowComponent?alt=com.microsoft.aad.adal.IWindowComponent&text=IWindowComponent" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable final <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: 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<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final IWindowComponent,final String,final String,@Nullable String,@Nullable final String,@Nullable final PromptBehavior,@Nullable String,@Nullable final String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.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)
name: 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)
nameWithType: AuthenticationContext.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)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>is not AUTO or claims are passed. This overload uses an [AlertDialog](<a href="https://developer.android.com/guide/topics/ui/dialogs">https://developer.android.com/guide/topics/ui/dialogs</a>) when user interaction is required. This overload does not support any flow requiring a [token broker](<a href="https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker">https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker</a>).</p>
name: prompt
type: '@Nullable final <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+final+String?alt=%40Nullable+final+String&text=%40Nullable+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: <p>acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> and can be used to call the specified protected resource. Bypasses token cache if </p>
syntax: 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<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(final String,final String,@Nullable String,@Nullable final String,@Nullable final PromptBehavior,@Nullable String,@Nullable final String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>It accepts both type of fragments. </p>
name: fragment
type: <xref href="com.microsoft.aad.adal.IWindowComponent?alt=com.microsoft.aad.adal.IWindowComponent&text=IWindowComponent" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p></p>
syntax: public void acquireToken(IWindowComponent fragment, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(IWindowComponent,String,String,@Nullable String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
name: acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. It will use packagename and provided suffix for this. </p>
name: redirectUri
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional if validateAuthority == null. It is used for cache and as a loginhint at authentication. </p>
name: loginHint
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. added as query parameter to authorization url </p>
name: prompt
type: '@Nullable <xref href="com.microsoft.aad.adal.PromptBehavior?alt=com.microsoft.aad.adal.PromptBehavior&text=PromptBehavior" data-throw-if-not-resolved="False"/>'
- description: <p>Optional. added to authorization url </p>
name: extraQueryParameters
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>acquireToken will authorize an end user to call the specified resource. The access token returned from the STS will be sent to the <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> 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](<a href="https://developer.android.com/guide/topics/ui/dialogs">https://developer.android.com/guide/topics/ui/dialogs</a>) when user interaction is required. This overload does not support any flow requiring a [token broker](<a href="https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker">https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker</a>).</p>
<p></p>
syntax: public void acquireToken(String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireToken(String,String,@Nullable String,@Nullable String,@Nullable PromptBehavior,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Required. </p>
name: refreshToken
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p>
<xrefsect id="deprecated_1_deprecated000002">
<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>
</xrefsect>
</p>
syntax: public void acquireTokenByRefreshToken(String refreshToken, String clientId, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String,String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>Required. </p>
name: refreshToken
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Required </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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.</p>
<p>
<xrefsect id="deprecated_1_deprecated000003">
<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>
</xrefsect>
</p>
syntax: public void acquireTokenByRefreshToken(String refreshToken, String clientId, String resource, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenByRefreshToken(String,String,String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: final <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: Future&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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</p>
<p>
<xrefsect id="deprecated_1_deprecated000001">
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>Use the <xref uid="com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,AuthenticationCallback&lt;AuthenticationResult&gt;)" data-throw-if-not-resolved="false" data-raw-source="acquireTokenSilentAsync"></xref> method. </p>
</xrefdescription>
</xrefsect>
</p>
syntax: public Future<AuthenticationResult> acquireTokenSilent(String resource, String clientId, String userId, final AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilent(String,String,String,final AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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</p>
<p></p>
syntax: public void acquireTokenSilentAsync(String resource, String clientId, String userId, @Nullable String claims, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,@Nullable String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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</p>
<p></p>
syntax: public void acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserId obtained from <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> inside <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>when true, access token is renewed using broker if available; otherwise, uses local refresh token </p>
name: forceRefresh
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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</p>
<p></p>
syntax: public void acquireTokenSilentAsync(String resource, String clientId, String userId, boolean forceRefresh, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsync(String,String,String,boolean,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
name: acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
nameWithType: AuthenticationContext.acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
parameters:
- description: <p>the actual saml assertion </p>
name: assertion
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>version of saml assertion being used </p>
name: assertionType
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- description: <p>required <xref uid="com.microsoft.aad.adal.AuthenticationCallback" data-throw-if-not-resolved="false" data-raw-source="AuthenticationCallback"></xref> object for async call. </p>
name: callback
type: <xref href="com.microsoft.aad.adal.AuthenticationCallback?alt=com.microsoft.aad.adal.AuthenticationCallback&text=AuthenticationCallback" data-throw-if-not-resolved="False"/>&lt;<xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>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</p>
<p></p>
syntax: public void acquireTokenSilentAsyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, final String resource, final String clientId, final String userId, AuthenticationCallback<AuthenticationResult> callback)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentAsyncWithAssertion(@NonNull final String,@NonNull final String,final String,final String,final String,AuthenticationCallback<AuthenticationResult>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId)
name: acquireTokenSilentSync(String resource, String clientId, String userId)
nameWithType: AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>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</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String,String,String)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
name: acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
nameWithType: AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>Optional. The claims challenge returned from middle tier service, will be added as query string to authorize endpoint. </p>
name: claims
type: <xref href="%40Nullable+String?alt=%40Nullable+String&text=%40Nullable+String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>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</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId, @Nullable String claims)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String,String,String,@Nullable String)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
name: acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
nameWithType: AuthenticationContext.acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
parameters:
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>when true, access token is renewed using broker if available; otherwise, uses local refresh token </p>
name: forceRefresh
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>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</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId, boolean forceRefresh)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSync(String,String,String,boolean)
- fullName: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
name: acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
nameWithType: AuthenticationContext.acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
parameters:
- description: <p>the actual saml assertion </p>
name: assertion
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>version of saml assertion being used </p>
name: assertionType
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required resource identifier. </p>
name: resource
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>required client identifier. </p>
name: clientId
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
- description: <p>UserID obtained from <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="#getUserInfo()"></xref></p>
name: userId
type: <xref href="%40NonNull+final+String?alt=%40NonNull+final+String&text=%40NonNull+final+String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>If silent request fails to get the token back. </p>
- type: <xref href="InterruptedException?alt=InterruptedException&text=InterruptedException" data-throw-if-not-resolved="False"/>
description: <p>If the main thread is interrupted before or during the activity. </p>
returns:
description: <p>A <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Future"></xref> object representing the <xref uid="com.microsoft.aad.adal.AuthenticationResult" data-throw-if-not-resolved="false" data-raw-source="AuthenticationResult"></xref> of the call. It contains Access Token,the Access Token's expiration time, Refresh token, and <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref>. </p>
type: <xref href="com.microsoft.aad.adal.AuthenticationResult?alt=com.microsoft.aad.adal.AuthenticationResult&text=AuthenticationResult" data-throw-if-not-resolved="False"/>
summary: >-
<p>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</p>
<p></p>
syntax: public AuthenticationResult acquireTokenSilentSyncWithAssertion(@NonNull final String assertion, @NonNull final String assertionType, @NonNull final String resource, @NonNull final String clientId, @NonNull final String userId)
uid: com.microsoft.aad.adal.AuthenticationContext.acquireTokenSilentSyncWithAssertion(@NonNull final String,@NonNull final String,@NonNull final String,@NonNull final String,@NonNull final String)
- fullName: com.microsoft.aad.adal.AuthenticationContext.cancelAuthenticationActivity(final int requestId)
name: cancelAuthenticationActivity(final int requestId)
nameWithType: AuthenticationContext.cancelAuthenticationActivity(final int requestId)
parameters:
- description: <p>Hash code value of your callback to cancel activity launch </p>
name: requestId
type: <xref href="final+int?alt=final+int&text=final+int" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="AuthenticationException?alt=AuthenticationException&text=AuthenticationException" data-throw-if-not-resolved="False"/>
description: <p>if failed to get the waiting request </p>
returns:
description: '<p>true: if there is a valid waiting request and cancel message sent successfully or if no waiting request exists. false: If the request could not be cancelled </p>'
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>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.</p>
<p></p>
syntax: public boolean cancelAuthenticationActivity(final int requestId)
uid: com.microsoft.aad.adal.AuthenticationContext.cancelAuthenticationActivity(final int)
- fullName: com.microsoft.aad.adal.AuthenticationContext.getAuthority()
name: getAuthority()
nameWithType: AuthenticationContext.getAuthority()
returns:
description: <p>Authority </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Gets authority that is used for this object of AuthenticationContext.</p>
<p></p>
syntax: public String getAuthority()
uid: com.microsoft.aad.adal.AuthenticationContext.getAuthority()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getBrokerUser()
name: getBrokerUser()
nameWithType: AuthenticationContext.getBrokerUser()
returns:
description: <p>Username </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Gets username for current broker user.</p>
<p></p>
syntax: public String getBrokerUser()
uid: com.microsoft.aad.adal.AuthenticationContext.getBrokerUser()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getBrokerUsers()
name: getBrokerUsers()
nameWithType: AuthenticationContext.getBrokerUsers()
exceptions:
- type: <xref href="IOException?alt=IOException&text=IOException" data-throw-if-not-resolved="False"/>
description: <p>if the broker returned an error response that indicates that it encountered an IOException while communicating with the authentication server. </p>
- type: <xref href="AuthenticatorException?alt=AuthenticatorException&text=AuthenticatorException" data-throw-if-not-resolved="False"/>
description: <p>if there was an error communicating with the authenticator or if the authenticator returned an invalid response. </p>
- type: <xref href="OperationCanceledException?alt=OperationCanceledException&text=OperationCanceledException" data-throw-if-not-resolved="False"/>
description: <p>if the request was canceled for any reason. </p>
returns:
description: <p>An array of <xref uid="com.microsoft.aad.adal.UserInfo" data-throw-if-not-resolved="false" data-raw-source="UserInfo"></xref> that haven been authenticated via broker(can be null). </p>
type: <xref href="com.microsoft.aad.adal.UserInfo?alt=com.microsoft.aad.adal.UserInfo&text=UserInfo" data-throw-if-not-resolved="False"/> []
summary: >-
<p>Gets user info from broker. This should not be called on main thread.</p>
<p></p>
syntax: public UserInfo [] getBrokerUsers()
uid: com.microsoft.aad.adal.AuthenticationContext.getBrokerUsers()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getCache()
name: getCache()
nameWithType: AuthenticationContext.getCache()
returns:
description: <p>ITokenCacheStore Current cache used </p>
type: <xref href="com.microsoft.aad.adal.ITokenCacheStore?alt=com.microsoft.aad.adal.ITokenCacheStore&text=ITokenCacheStore" data-throw-if-not-resolved="False"/>
summary: >-
<p>Returns referenced cache. You can use default cache, which uses SharedPreferencesFileManager and handles synchronization by itself.</p>
<p></p>
syntax: public ITokenCacheStore getCache()
uid: com.microsoft.aad.adal.AuthenticationContext.getCache()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getClientCapabilites()
name: getClientCapabilites()
nameWithType: AuthenticationContext.getClientCapabilites()
returns:
type: <xref href="List%3CString%3E?alt=List%3CString%3E&text=List%3CString%3E" data-throw-if-not-resolved="False"/>
syntax: public List<String> getClientCapabilites()
uid: com.microsoft.aad.adal.AuthenticationContext.getClientCapabilites()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getExtendedLifetimeEnabled()
name: getExtendedLifetimeEnabled()
nameWithType: AuthenticationContext.getExtendedLifetimeEnabled()
returns:
description: <p>True when ExtendedLifetime mode is enabled </p>
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>Gets if the ExtendedLifetime mode is enabled.</p>
<p></p>
syntax: public boolean getExtendedLifetimeEnabled()
uid: com.microsoft.aad.adal.AuthenticationContext.getExtendedLifetimeEnabled()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getRedirectUriForBroker()
name: getRedirectUriForBroker()
nameWithType: AuthenticationContext.getRedirectUriForBroker()
returns:
description: <p>RedirectUri string to use for broker requests. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Get expected redirect Uri for your app to use in broker. You need to register this redirectUri in order to get token from Broker.</p>
<p></p>
syntax: public String getRedirectUriForBroker()
uid: com.microsoft.aad.adal.AuthenticationContext.getRedirectUriForBroker()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getRequestCorrelationId()
name: getRequestCorrelationId()
nameWithType: AuthenticationContext.getRequestCorrelationId()
returns:
description: <p>UUID </p>
type: <xref href="UUID?alt=UUID&text=UUID" data-throw-if-not-resolved="False"/>
summary: >-
<p>Get the CorrelationId set by user.</p>
<p></p>
syntax: public UUID getRequestCorrelationId()
uid: com.microsoft.aad.adal.AuthenticationContext.getRequestCorrelationId()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getValidateAuthority()
name: getValidateAuthority()
nameWithType: AuthenticationContext.getValidateAuthority()
returns:
description: <p>True If developer turn on the authority validation, false otherwise. </p>
type: <xref href="boolean?alt=boolean&text=boolean" data-throw-if-not-resolved="False"/>
syntax: public boolean getValidateAuthority()
uid: com.microsoft.aad.adal.AuthenticationContext.getValidateAuthority()
- fullName: com.microsoft.aad.adal.AuthenticationContext.getVersionName()
name: getVersionName()
nameWithType: AuthenticationContext.getVersionName()
returns:
description: <p>The current SDK version. </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Version name for ADAL not for the app itself.</p>
<p></p>
syntax: public static String getVersionName()
uid: com.microsoft.aad.adal.AuthenticationContext.getVersionName()
- fullName: com.microsoft.aad.adal.AuthenticationContext.mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
name: mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
nameWithType: AuthenticationContext.mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
parameters:
- description: <p>input claims passed on acquireToken call * </p>
name: claims
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
- name: clientCapabilities
type: <xref href="final+List%3CString%3E?alt=final+List%3CString%3E&text=final+List%3CString%3E" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="JSONException?alt=JSONException&text=JSONException" data-throw-if-not-resolved="False"/>
description: <p>if input claims is an invalid JSON </p>
returns:
description: <p>merged claims with capabilities * </p>
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
summary: >-
<p>Util method to merge <pre>
Sample input claim :
{
"userinfo": {
"given_name": {"essential": true},
"email": {"essential": true},
},
"id_token": {
"auth_time": {"essential": true},
}
}</pre></p>
<p>
<pre>Sample capabilities list : [CP1, CP2 CP3]</pre>
</p>
<p>
<pre>Output merged claims :
{
"userinfo": {
"given_name": {
"essential": true
},
"email": {
"essential": true
}
},
"id_token": {
"auth_time": {
"essential": true
}
},
"access_token": {
"xms_cc": {
"values": ["CP1", "CP2"]
}
}
}
</pre> * </p>
syntax: public static String mergeClaimsWithClientCapabilities(final String claims, final List<String> clientCapabilities)
uid: com.microsoft.aad.adal.AuthenticationContext.mergeClaimsWithClientCapabilities(final String,final List<String>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.onActivityResult(final int requestCode, final int resultCode, final Intent data)
name: onActivityResult(final int requestCode, final int resultCode, final Intent data)
nameWithType: AuthenticationContext.onActivityResult(final int requestCode, final int resultCode, final Intent data)
parameters:
- description: <p>Request code provided at the start of the activity. </p>
name: requestCode
type: <xref href="final+int?alt=final+int&text=final+int" data-throw-if-not-resolved="False"/>
- description: <p>Result code set from the activity. </p>
name: resultCode
type: <xref href="final+int?alt=final+int&text=final+int" data-throw-if-not-resolved="False"/>
- description: >-
<p>
<xref uid="" data-throw-if-not-resolved="false" data-raw-source="Intent"></xref>
</p>
name: data
type: <xref href="final+Intent?alt=final+Intent&text=final+Intent" data-throw-if-not-resolved="False"/>
summary: >-
<p>This method wraps the implementation for onActivityResult at the related Activity class. This method is called at UI thread.</p>
<p></p>
syntax: public void onActivityResult(final int requestCode, final int resultCode, final Intent data)
uid: com.microsoft.aad.adal.AuthenticationContext.onActivityResult(final int,final int,final Intent)
- fullName: com.microsoft.aad.adal.AuthenticationContext.setClientCapabilites(List<String> clientCapabilites)
name: setClientCapabilites(List<String> clientCapabilites)
nameWithType: AuthenticationContext.setClientCapabilites(List<String> clientCapabilites)
parameters:
- name: clientCapabilites
type: <xref href="List%3CString%3E?alt=List%3CString%3E&text=List%3CString%3E" data-throw-if-not-resolved="False"/>
syntax: public void setClientCapabilites(List<String> clientCapabilites)
uid: com.microsoft.aad.adal.AuthenticationContext.setClientCapabilites(List<String>)
- fullName: com.microsoft.aad.adal.AuthenticationContext.setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
name: setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
nameWithType: AuthenticationContext.setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
parameters:
- description: <p>true if the ExtendedLifetime mode is on, false otherwise </p>
name: extendedLifetimeEnabled
type: <xref href="final+boolean?alt=final+boolean&text=final+boolean" data-throw-if-not-resolved="False"/>
summary: >-
<p>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</p>
<p></p>
syntax: public void setExtendedLifetimeEnabled(final boolean extendedLifetimeEnabled)
uid: com.microsoft.aad.adal.AuthenticationContext.setExtendedLifetimeEnabled(final boolean)
- fullName: com.microsoft.aad.adal.AuthenticationContext.setRequestCorrelationId(final UUID requestCorrelationId)
name: setRequestCorrelationId(final UUID requestCorrelationId)
nameWithType: AuthenticationContext.setRequestCorrelationId(final UUID requestCorrelationId)
parameters:
- description: <p>The correlation id <xref uid="" data-throw-if-not-resolved="false" data-raw-source="UUID"></xref> to be set in the request. </p>
name: requestCorrelationId
type: <xref href="final+UUID?alt=final+UUID&text=final+UUID" data-throw-if-not-resolved="False"/>
summary: >-
<p>Set CorrelationId to requests.</p>
<p></p>
syntax: public void setRequestCorrelationId(final UUID requestCorrelationId)
uid: com.microsoft.aad.adal.AuthenticationContext.setRequestCorrelationId(final UUID)
nameWithType: AuthenticationContext
syntax: public class AuthenticationContext
type: class
uid: com.microsoft.aad.adal.AuthenticationContext
fullName: com.microsoft.aad.adal.AuthenticationContext
name: AuthenticationContext
package: com.microsoft.aad.adal
summary: <p>ADAL context to get access token, refresh token, and lookup from cache. </p>
metadata: {}