Package org.jose4j.jwt.consumer
Class TypeValidator
java.lang.Object
org.jose4j.jwt.consumer.TypeValidator
- All Implemented Interfaces:
ErrorCodeValidator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static classNested classes/interfaces inherited from interface org.jose4j.jwt.consumer.ErrorCodeValidator
ErrorCodeValidator.Error -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate TypeValidator.SimpleMediaTypeprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate TypeValidator.SimpleMediaTypetoMediaType(String typ) (package private) ErrorCodeValidator.Errorvalidate(JwtContext jwtContext) Validate some aspect of the JWT.
-
Field Details
-
APPLICATION_PRIMARY_TYPE
- See Also:
-
expectedType
-
requireType
private boolean requireType
-
-
Constructor Details
-
TypeValidator
-
-
Method Details
-
validate
Description copied from interface:ErrorCodeValidatorValidate some aspect of the JWT.
Implementations should use negative values for error codes so as to avoid potential collisions with error code values used by this library, which are defined in
ErrorCodes.- Specified by:
validatein interfaceErrorCodeValidator- Parameters:
jwtContext- the JWT context- Returns:
- a Error object with a stable error code and description of the problem or null, if valid
-
validate
-
toMediaType
private TypeValidator.SimpleMediaType toMediaType(String typ) throws TypeValidator.MediaTypeParseException
-