@Extensible @BrokerExtension @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class AccessTokenValidator extends AbstractAccessTokenValidator
dsconfig create-token-validator \ ---validator-name "{name}" \ --type third-party \ --set "extension-class:{class-name}" \ --set "extension-argument:{name=value}"where "{name}" is the name to use for the Access Token Validator instance, "{class-name}" is the fully-qualified name of the Java class that extends
com.unboundid.directory.sdk.broker.api.AccessTokenValidator
,
and "{name=value}" represents name-value pairs for any arguments to
provide to the Access Token Validator. If multiple arguments should be
provided to the extension, then the
"--set extension-argument:{name=value}
" option should be
provided multiple times.Constructor and Description |
---|
AccessTokenValidator() |
Modifier and Type | Method and Description |
---|---|
abstract TokenValidationResult |
validate(java.lang.String encodedAccessToken)
Validate the provided access token.
|
defineConfigArguments, finalizeTokenValidator, getExamplesArgumentSets, getExtensionDescription, getExtensionName, initializeTokenValidator
public AccessTokenValidator()
public abstract TokenValidationResult validate(java.lang.String encodedAccessToken) throws java.lang.Exception
validate
in class AbstractAccessTokenValidator
encodedAccessToken
- access token string as it is received from the
requesting client.active
field of the TokenValidationResult must be
set by the validator.
The decision as to whether an access token is accepted or not is made by
the Data Governance Server's policy engine. All properties of the
TokenValidationResult are available to XACML policies, however it is
possible that policies may only examine a subset of those properties.
When writing a new validator it is important to match up the properties
exposed by the validator with the properties consulted by the default
and/or custom policies.
If the token cannot be introspected by the Access Token Validator it must
return null to allow other validators to have a chance to process the
token.java.lang.Exception
- if an error occurs during the processing of a token
that can be introspected by the validator. Exceptions should only be
thrown for unexpected internal errors. Sensitive information should not
be included in the exception message as the message may be returned to
the client application that has passed the token.