Package com.auth0.jwt.interfaces
Interface Header
-
- All Known Subinterfaces:
DecodedJWT
public interface HeaderThe Header class represents the 1st part of the JWT, where the Header value is held.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAlgorithm()Getter for the Algorithm "alg" claim defined in the JWT's Header.java.lang.StringgetContentType()Getter for the Content Type "cty" claim defined in the JWT's Header.ClaimgetHeaderClaim(java.lang.String name)Get a Private Claim given it's name.java.lang.StringgetKeyId()Get the value of the "kid" claim, or null if it's not available.java.lang.StringgetType()Getter for the Type "typ" claim defined in the JWT's Header.
-
-
-
Method Detail
-
getAlgorithm
java.lang.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
java.lang.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
java.lang.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
java.lang.String getKeyId()
Get the value of the "kid" claim, or null if it's not available.- Returns:
- the Key ID value or null.
-
getHeaderClaim
Claim getHeaderClaim(java.lang.String name)
Get a Private Claim given it's name. If the Claim wasn't specified in the Header, a 'null claim' will be returned. All the methods of that claim will returnnull.- Parameters:
name- the name of the Claim to retrieve.- Returns:
- a non-null Claim.
-
-