public final class OAuthSecurityContext extends java.lang.Object implements ExecutionContext.SecurityContext
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS_TOKEN |
AUTHENTICATION_DATA_ID, AUTHENTICATION_SCHEME_ID
Constructor and Description |
---|
OAuthSecurityContext(char[] accessToken) |
Modifier and Type | Method and Description |
---|---|
char[] |
getAccessToken()
Retrieve the access token that should be used for authentication.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllProperties() |
java.lang.Object |
getProperty(java.lang.String key) |
static OAuthSecurityContext |
newInstance(ExecutionContext.SecurityContext context)
Creates a
OAuthSecurityContext from the given
ExecutionContext.SecurityContext if it has an access token. |
public static final java.lang.String ACCESS_TOKEN
public OAuthSecurityContext(char[] accessToken)
accessToken
- Access token to be used for authentication, it cannot be null.public java.lang.Object getProperty(java.lang.String key)
getProperty
in interface ExecutionContext.SecurityContext
public java.util.Map<java.lang.String,java.lang.Object> getAllProperties()
getAllProperties
in interface ExecutionContext.SecurityContext
Map
representing all the
propertiespublic char[] getAccessToken()
public static OAuthSecurityContext newInstance(ExecutionContext.SecurityContext context)
OAuthSecurityContext
from the given
ExecutionContext.SecurityContext
if it has an access token. Otherwise
null
will be returned.context
- cannot be null.OAuthSecurityContext
.