public class SSITokenV1Validator extends Object implements ISSITokenValidator<SSITokenV1Metadata>
ISSITokenValidator
for the token schema SSITokenSchema.SSI_1_0
.Constructor and Description |
---|
SSITokenV1Validator(@NonNull LinkTokenV1Provider linkTokenProvider) |
Modifier and Type | Method and Description |
---|---|
SSITokenInfo<SSITokenV1Metadata> |
decodeAndVerifyToken(@NonNull SSIToken ssiToken,
@NonNull IRequestContext requestContext)
Decodes an
SSIToken and additionally verifies that token signature
is valid and token usage is within its validity window. |
SSITokenInfo<SSITokenV1Metadata> |
decodeToken(@NonNull SSIToken ssiToken,
@NonNull IRequestContext requestContext)
Decodes an
SSIToken . |
SSITokenSchema |
getTokenSchema()
Returns
SSITokenSchema associated with this instance. |
@Inject public SSITokenV1Validator(@NonNull @NonNull LinkTokenV1Provider linkTokenProvider)
public SSITokenSchema getTokenSchema()
ISSITokenValidator
SSITokenSchema
associated with this instance.getTokenSchema
in interface ISSITokenValidator<SSITokenV1Metadata>
SSITokenSchema
.public SSITokenInfo<SSITokenV1Metadata> decodeToken(@NonNull @NonNull SSIToken ssiToken, @NonNull @NonNull IRequestContext requestContext) throws TokenException
ISSITokenValidator
SSIToken
.decodeToken
in interface ISSITokenValidator<SSITokenV1Metadata>
ssiToken
- SSI token to decode.requestContext
- IRequestContext
object which holds additional
contextual information about the request.InvalidTokenException
- is thrown when the token cannot be decoded
when it's malformed.TokenException
- is thrown to indicate other unexpected
errors encountered while decoding token.public SSITokenInfo<SSITokenV1Metadata> decodeAndVerifyToken(@NonNull @NonNull SSIToken ssiToken, @NonNull @NonNull IRequestContext requestContext) throws TokenException
ISSITokenValidator
SSIToken
and additionally verifies that token signature
is valid and token usage is within its validity window.decodeAndVerifyToken
in interface ISSITokenValidator<SSITokenV1Metadata>
ssiToken
- SSI token to decode.requestContext
- IRequestContext
object which holds additional
contextual information about the request.InvalidTokenException
- is thrown when the token cannot be decoded
when it's malformed.InvalidSignatureException
- is thrown when the token signature could
not be verified.TokenException
- is thrown to indicate other unexpected
errors encountered while decoding token.