public interface ISSITokenValidator<T extends SSITokenMetadata>
ISSITokenGenerator
defines contract for SSI token decoding and
validation APIs.Modifier and Type | Method and Description |
---|---|
SSITokenInfo<T> |
decodeAndVerifyToken(SSIToken ssiToken,
IRequestContext requestContext)
Decodes an
SSIToken and additionally verifies that token signature
is valid and token usage is within its validity window. |
SSITokenInfo<T> |
decodeToken(SSIToken ssiToken,
IRequestContext requestContext)
Decodes an
SSIToken . |
SSITokenSchema |
getTokenSchema()
Returns
SSITokenSchema associated with this instance. |
SSITokenSchema getTokenSchema()
SSITokenSchema
associated with this instance.SSITokenSchema
.SSITokenInfo<T> decodeToken(SSIToken ssiToken, IRequestContext requestContext) throws TokenException
SSIToken
.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.SSITokenInfo<T> decodeAndVerifyToken(SSIToken ssiToken, IRequestContext requestContext) throws TokenException
SSIToken
and additionally verifies that token signature
is valid and token usage is within its validity window.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.