Package com.auth0.jwt.impl
Class BasicHeader
- java.lang.Object
-
- com.auth0.jwt.impl.BasicHeader
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringalgorithmprivate java.lang.StringcontentTypeprivate java.lang.StringkeyIdprivate com.fasterxml.jackson.databind.ObjectReaderobjectReaderprivate java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode>treeprivate java.lang.Stringtype
-
Constructor Summary
Constructors Constructor Description BasicHeader(java.lang.String algorithm, java.lang.String type, java.lang.String contentType, java.lang.String keyId, java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> tree, com.fasterxml.jackson.databind.ObjectReader objectReader)
-
Method Summary
All Methods Instance Methods Concrete 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.(package private) java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode>getTree()java.lang.StringgetType()Getter for the Type "typ" claim defined in the JWT's Header.
-
-
-
Field Detail
-
algorithm
private final java.lang.String algorithm
-
type
private final java.lang.String type
-
contentType
private final java.lang.String contentType
-
keyId
private final java.lang.String keyId
-
tree
private final java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> tree
-
objectReader
private final com.fasterxml.jackson.databind.ObjectReader objectReader
-
-
Method Detail
-
getTree
java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> getTree()
-
getAlgorithm
public java.lang.String getAlgorithm()
Description copied from interface:HeaderGetter for the Algorithm "alg" claim defined in the JWT's Header. If the claim is missing it will return null.- Specified by:
getAlgorithmin interfaceHeader- Returns:
- the Algorithm defined or null.
-
getType
public java.lang.String getType()
Description copied from interface:HeaderGetter for the Type "typ" claim defined in the JWT's Header. If the claim is missing it will return null.
-
getContentType
public java.lang.String getContentType()
Description copied from interface:HeaderGetter for the Content Type "cty" claim defined in the JWT's Header. If the claim is missing it will return null.- Specified by:
getContentTypein interfaceHeader- Returns:
- the Content Type defined or null.
-
getKeyId
public java.lang.String getKeyId()
Description copied from interface:HeaderGet the value of the "kid" claim, or null if it's not available.
-
getHeaderClaim
public Claim getHeaderClaim(java.lang.String name)
Description copied from interface:HeaderGet a Private Claim given it's name. If the Claim wasn't specified in the Header, a NullClaim will be returned.- Specified by:
getHeaderClaimin interfaceHeader- Parameters:
name- the name of the Claim to retrieve.- Returns:
- a non-null Claim.
-
-