Package com.auth0.jwt.interfaces
Interface Header
-
- All Known Subinterfaces:
DecodedJWT
public interface Header
The Header class represents the 1st part of the JWT, where the Header value is hold.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getAlgorithm()
Getter for the Algorithm "alg" claim defined in the JWT's Header.String
getContentType()
Getter for the Content Type "cty" claim defined in the JWT's Header.Claim
getHeaderClaim(String name)
Get a Private Claim given it's name.String
getKeyId()
Get the value of the "kid" claim, or null if it's not available.String
getType()
Getter for the Type "typ" claim defined in the JWT's Header.
-
-
-
Method Detail
-
getAlgorithm
String getAlgorithm()
Getter for the Algorithm "alg" claim defined in the JWT's Header. If the claim is missing it will return null.- Returns:
- the Algorithm defined or null.
-
getType
String getType()
Getter for the Type "typ" claim defined in the JWT's Header. If the claim is missing it will return null.- Returns:
- the Type defined or null.
-
getContentType
String getContentType()
Getter for the Content Type "cty" claim defined in the JWT's Header. If the claim is missing it will return null.- Returns:
- the Content Type defined or null.
-
getKeyId
String getKeyId()
Get the value of the "kid" claim, or null if it's not available.- Returns:
- the Key ID value or null.
-
-