com.microsoft.aad.adal
Enum PromptBehavior

java.lang.Object
  extended by java.lang.Enum<PromptBehavior>
      extended by com.microsoft.aad.adal.PromptBehavior
All Implemented Interfaces:
Serializable, Comparable<PromptBehavior>

public enum PromptBehavior
extends Enum<PromptBehavior>

Prompt Behaviors that sets the behavior for authentication activity launch.


Enum Constant Summary
Always
          The user will be prompted for credentials even if it is available in the cache or in the form of refresh token.
Auto
          Acquire token will prompt the user for credentials only when necessary.
REFRESH_SESSION
          Re-authorizes (through displaying webview) the resource usage, making sure that the resulting access token contains the updated claims.
 
Method Summary
static PromptBehavior valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PromptBehavior[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Auto

public static final PromptBehavior Auto
Acquire token will prompt the user for credentials only when necessary.


Always

public static final PromptBehavior Always
The user will be prompted for credentials even if it is available in the cache or in the form of refresh token. New acquired access token and refresh token will be used to replace previous value. If Settings switched to Auto, new request will use this latest token from cache.


REFRESH_SESSION

public static final PromptBehavior REFRESH_SESSION
Re-authorizes (through displaying webview) the resource usage, making sure that the resulting access token contains the updated claims. If user logon cookies are available, the user will not be asked for credentials again and the logon dialog will dismiss automatically. This is equivalent to passing prompt=refresh_session as an extra query parameter during the authorization.

Method Detail

values

public static PromptBehavior[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PromptBehavior c : PromptBehavior.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PromptBehavior valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2003–2015. All rights reserved.