10Duke Java Core
Loading...
Searching...
No Matches
tenduke.sdk.core.service.impl.DefaultJwtMetadataParser Class Reference

Detailed Description

Default implementation of the JwtMetadataParser for reading and validating JWT headers and their data.

Inheritance diagram for tenduke.sdk.core.service.impl.DefaultJwtMetadataParser:
tenduke.sdk.core.service.JwtMetadataParser tenduke.sdk.core.service.impl.DefaultJwtService

Public Member Functions

String readKeyIdHeader (final String jwt)
 Reads a key id from the JWT header.
 
DefaultJwtMetadataParser withTypHeaderValidationDisabled ()
 Turns JWT typ header claim validation off.
 
- Public Member Functions inherited from tenduke.sdk.core.service.JwtMetadataParser

Protected Member Functions

void assertJwtHeadersAreValid (final String jwt)
 Checks that headers are sane.
 

Additional Inherited Members

- Public Attributes inherited from tenduke.sdk.core.service.JwtMetadataParser
String HEADER_SIGNATURE_ALGORITHM = "alg"
 Header claim name for signature algorithm.
 
String HEADER_KEY_ID = "kid"
 Header claim name for key id.
 
String HEADER_TYPE = "typ"
 Header claim name for token type.
 
String TOKEN_TYPE_JWT = "JWT"
 Header claim type that denotes a JWT.
 
String SIGNATURE_ALGORITHM_RSA_SHA = "RS256"
 Header value for alg claim, denotes RSA-SHA algorithm used for JWT signatures.
 

Member Function Documentation

◆ assertJwtHeadersAreValid()

void tenduke.sdk.core.service.impl.DefaultJwtMetadataParser.assertJwtHeadersAreValid ( final String jwt)
protected

Checks that headers are sane.

NOTE: algorithm check is made by Jose lib.

Parameters
jwtThe JWT to validate the header in.

◆ readKeyIdHeader()

String tenduke.sdk.core.service.impl.DefaultJwtMetadataParser.readKeyIdHeader ( final String jwt)

Reads a key id from the JWT header.

Parameters
jwtThe source to extract the key id from.
Returns
The key id or null of such a claim was not found.

Implements tenduke.sdk.core.service.JwtMetadataParser.

◆ withTypHeaderValidationDisabled()

DefaultJwtMetadataParser tenduke.sdk.core.service.impl.DefaultJwtMetadataParser.withTypHeaderValidationDisabled ( )

Turns JWT typ header claim validation off.

Returns
this instance.

Reimplemented in tenduke.sdk.core.service.impl.DefaultJwtService.


The documentation for this class was generated from the following file: