public class CspClientCredentialsSecurityContext extends java.lang.Object implements CspAccessTokenSecurityContext
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLIENT_ID |
static java.lang.String |
CLIENT_SECRET |
static java.lang.String |
ORG_ID |
protected java.util.Map<java.lang.String,java.lang.Object> |
properties |
AUTHENTICATION_DATA_ID, AUTHENTICATION_SCHEME_ID| Constructor and Description |
|---|
CspClientCredentialsSecurityContext(java.lang.String clientId,
char[] clientSecret,
java.lang.String orgId) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAllProperties() |
java.lang.String |
getClientId() |
char[] |
getClientSecret() |
java.lang.String |
getOrgId() |
java.lang.Object |
getProperty(java.lang.String key) |
boolean |
needsRefresh()
Method to check if access token needs to be refreshed.
|
void |
setAccessToken(char[] accessToken)
Used to set AccessToken in security context.
|
public static final java.lang.String CLIENT_ID
public static final java.lang.String CLIENT_SECRET
public static final java.lang.String ORG_ID
protected final java.util.Map<java.lang.String,java.lang.Object> properties
public CspClientCredentialsSecurityContext(java.lang.String clientId,
char[] clientSecret,
java.lang.String orgId)
clientId - Client Identifier (AKA App ID) for CSP; must not be nullclientSecret - Client Secret (AKA App Secret) for CSP; must not be nullorgId - Organization ID for which access token needs to be generated.
If this is null, token will be generated for default orgId.public void setAccessToken(char[] accessToken)
CspAccessTokenSecurityContextsetAccessToken in interface CspAccessTokenSecurityContextpublic boolean needsRefresh()
CspAccessTokenSecurityContextneedsRefresh in interface CspAccessTokenSecurityContextpublic java.lang.String getClientId()
nullpublic char[] getClientSecret()
nullpublic java.lang.String getOrgId()
public java.lang.Object getProperty(java.lang.String key)
getProperty in interface ExecutionContext.SecurityContextpublic java.util.Map<java.lang.String,java.lang.Object> getAllProperties()
getAllProperties in interface ExecutionContext.SecurityContextMap representing all the
properties