public class AuthenticationParameters
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AuthenticationParameters.AuthenticationParamCallback
Callback to use for async request.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTH_HEADER_INVALID_FORMAT
Invalid authentication header format.
|
static java.lang.String |
AUTH_HEADER_MISSING
WWW-Authenticate header was expected in the response.
|
static java.lang.String |
AUTH_HEADER_MISSING_AUTHORITY
WWW-Authenticate header is missing authorization_uri.
|
static java.lang.String |
AUTH_HEADER_WRONG_STATUS
Unauthorized http response (status code 401) was expected.
|
static java.lang.String |
AUTHENTICATE_HEADER
Constant Authenticate header: WWW-Authenticate.
|
static java.lang.String |
AUTHORITY_KEY
Constant Authority key.
|
static java.lang.String |
BEARER
Constant Bearer.
|
static java.lang.String |
RESOURCE_KEY
Constant Resource key.
|
Constructor and Description |
---|
AuthenticationParameters()
Creates AuthenticationParameters.
|
Modifier and Type | Method and Description |
---|---|
static void |
createFromResourceUrl(android.content.Context context,
java.net.URL resourceUrl,
AuthenticationParameters.AuthenticationParamCallback callback)
ADAL will make the call to get authority and resource info.
|
static AuthenticationParameters |
createFromResponseAuthenticateHeader(java.lang.String authenticateHeader)
ADAL will parse the header response to get the authority and the resource
info.
|
java.lang.String |
getAuthority()
get authority from the header.
|
java.lang.String |
getResource()
get resource from the header.
|
public static final java.lang.String AUTH_HEADER_MISSING_AUTHORITY
public static final java.lang.String AUTH_HEADER_INVALID_FORMAT
public static final java.lang.String AUTH_HEADER_MISSING
public static final java.lang.String AUTH_HEADER_WRONG_STATUS
public static final java.lang.String AUTHENTICATE_HEADER
public static final java.lang.String BEARER
public static final java.lang.String AUTHORITY_KEY
public static final java.lang.String RESOURCE_KEY
public AuthenticationParameters()
public java.lang.String getAuthority()
public java.lang.String getResource()
public static void createFromResourceUrl(android.content.Context context, java.net.URL resourceUrl, AuthenticationParameters.AuthenticationParamCallback callback)
context
- Context
resourceUrl
- Url for resource to query for 401 response.callback
- AuthenticationParameters.AuthenticationParamCallback
public static AuthenticationParameters createFromResponseAuthenticateHeader(java.lang.String authenticateHeader) throws ResourceAuthenticationChallengeException
authenticateHeader
- Header to check authority and resource.AuthenticationParameters
{@link
- ResourceAuthenticationChallengeException}ResourceAuthenticationChallengeException