com.microsoft.aad.adal
Enum AuthenticationSettings

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

public enum AuthenticationSettings
extends Enum<AuthenticationSettings>

Settings to be used in AuthenticationContext.


Enum Constant Summary
INSTANCE
          Singleton setting instance.
 
Method Summary
 String getActivityPackageName()
          get package name to setup intent for AuthenticationActivity.
 String getBrokerPackageName()
          Gets packagename for broker app that installed authenticator.
 String getBrokerSignature()
          Gets broker signature for broker app that installed authenticator.
 int getConnectTimeOut()
           
 Class<?> getDeviceCertificateProxy()
          get class for work place join related API.
 int getExpirationBuffer()
          Gets expiration buffer.
 int getReadTimeOut()
           
 byte[] getSecretKeyData()
          Get bytes to derive secretKey to use in encrypt/decrypt.
 String getSharedPrefPackageName()
          Gets package name provided for shared preferences.
 boolean getSkipBroker()
          Skip broker usage.
 void setActivityPackageName(String activityPackageName)
          set package name to setup intent for AuthenticationActivity.
 void setBrokerPackageName(String packageName)
          Sets package name for broker app that installed authenticator.
 void setBrokerSignature(String brokerSignature)
          Sets broker app info for ADAL to use.
 void setConnectTimeOut(int timeOutMillis)
          Sets the maximum time in milliseconds to wait while connecting.
 void setDeviceCertificateProxyClass(Class clazz)
          set class for work place join related API.
 void setExpirationBuffer(int expirationBuffer)
          When checking access token expiration, it will check if the time to expiration is less than this value(in seconds).
 void setReadTimeOut(int timeOutMillis)
          Sets the maximum time to wait for an input stream read to complete before giving up.
 void setSecretKey(byte[] rawKey)
          set raw bytes to derive secretKey to use in encrypt/decrypt.
 void setSharedPrefPackageName(String packageNameForSharedFile)
          Sets package name to use DefaultTokenCacheStore with sharedUserId apps.
 void setSkipBroker(boolean skip)
          Sets flag to skip broker.
static AuthenticationSettings valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AuthenticationSettings[] 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

INSTANCE

public static final AuthenticationSettings INSTANCE
Singleton setting instance.

Method Detail

values

public static AuthenticationSettings[] 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 (AuthenticationSettings c : AuthenticationSettings.values())
    System.out.println(c);

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

valueOf

public static AuthenticationSettings 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

getSecretKeyData

public byte[] getSecretKeyData()
Get bytes to derive secretKey to use in encrypt/decrypt.

Returns:
byte[] secret data

setSecretKey

public void setSecretKey(byte[] rawKey)
set raw bytes to derive secretKey to use in encrypt/decrypt. KeySpec algorithm is AES.

Parameters:
rawKey - App related key to use in encrypt/decrypt

getBrokerPackageName

public String getBrokerPackageName()
Gets packagename for broker app that installed authenticator.

Returns:
packagename

setBrokerPackageName

public void setBrokerPackageName(String packageName)
Sets package name for broker app that installed authenticator.

Parameters:
packageName - package name related to broker

getBrokerSignature

public String getBrokerSignature()
Gets broker signature for broker app that installed authenticator.

Returns:
signature

setBrokerSignature

public void setBrokerSignature(String brokerSignature)
Sets broker app info for ADAL to use.

Parameters:
brokerSignature - Signature for broker

setDeviceCertificateProxyClass

public void setDeviceCertificateProxyClass(Class clazz)
set class for work place join related API. This is only used from Authenticator side.

Type Parameters:
T -
Parameters:
clazz -

getDeviceCertificateProxy

public Class<?> getDeviceCertificateProxy()
get class for work place join related API. This is only used from Authenticator side.

Returns:

getActivityPackageName

public String getActivityPackageName()
get package name to setup intent for AuthenticationActivity.

Returns:
Package name for activity

setActivityPackageName

public void setActivityPackageName(String activityPackageName)
set package name to setup intent for AuthenticationActivity.

Parameters:
activityPackageName - activity to use from different package

getSkipBroker

public boolean getSkipBroker()
Skip broker usage.

Returns:
true if broker is not used.

setSkipBroker

public void setSkipBroker(boolean skip)
Sets flag to skip broker.

Parameters:
skip - True to not use broker

setSharedPrefPackageName

public void setSharedPrefPackageName(String packageNameForSharedFile)
Sets package name to use DefaultTokenCacheStore with sharedUserId apps.

Parameters:
packageNameForSharedFile - Package name of other app

getSharedPrefPackageName

public String getSharedPrefPackageName()
Gets package name provided for shared preferences.

Returns:
package name provided for shared preferences

getExpirationBuffer

public int getExpirationBuffer()
Gets expiration buffer.

Returns:

setExpirationBuffer

public void setExpirationBuffer(int expirationBuffer)
When checking access token expiration, it will check if the time to expiration is less than this value(in seconds). Example: Set to 300 to give 5min buffer. Token with Expiry time of 12:04 will say expired when actual time is 12:00 with 5min buffer.

Parameters:
expirationBuffer -

getConnectTimeOut

public int getConnectTimeOut()

setConnectTimeOut

public void setConnectTimeOut(int timeOutMillis)
Sets the maximum time in milliseconds to wait while connecting. Connecting to a server will fail with a SocketTimeoutException if the timeout elapses before a connection is established. Default value is 30000 milliseconds.

Parameters:
timeOutMillis - the connect timeout in milliseconds. Non-negative
Throws:
IllegalArgumentException - if timeoutMillis < 0.

getReadTimeOut

public int getReadTimeOut()

setReadTimeOut

public void setReadTimeOut(int timeOutMillis)
Sets the maximum time to wait for an input stream read to complete before giving up. Reading will fail with a SocketTimeoutException if the timeout elapses before data becomes available. The default value is 30000.

Parameters:
timeoutMillis - the read timeout in milliseconds. Non-negative


Copyright © 2003–2015. All rights reserved.