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 null
clientSecret
- Client Secret (AKA App Secret) for CSP; must not be null
orgId
- 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)
CspAccessTokenSecurityContext
setAccessToken
in interface CspAccessTokenSecurityContext
public boolean needsRefresh()
CspAccessTokenSecurityContext
needsRefresh
in interface CspAccessTokenSecurityContext
public java.lang.String getClientId()
null
public char[] getClientSecret()
null
public java.lang.String getOrgId()
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
properties