de.cidaas.jwt.interfaces.Header Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cidaas-interceptor-spring-security Show documentation
Show all versions of cidaas-interceptor-spring-security Show documentation
Interceptor for Cidaas Java Spring Clients
package de.cidaas.jwt.interfaces;
import de.cidaas.jwt.interfaces.Claim;
/**
* The Header class represents the 1st part of the JWT, where the Header value is hold.
*/
public interface Header {
/**
* Getter for the Algorithm "alg" claim defined in the JWT's Header. If the claim is missing it will return null.
*
* @return the Algorithm defined or null.
*/
String getAlgorithm();
/**
* Getter for the Type "typ" claim defined in the JWT's Header. If the claim is missing it will return null.
*
* @return the Type defined or null.
*/
String getType();
/**
* Getter for the Content Type "cty" claim defined in the JWT's Header. If the claim is missing it will return null.
*
* @return the Content Type defined or null.
*/
String getContentType();
/**
* Get the value of the "kid" claim, or null if it's not available.
*
* @return the Key ID value or null.
*/
String getKeyId();
/**
* Get a Private Claim given it's name. If the Claim wasn't specified in the Header, a NullClaim will be returned.
*
* @param name the name of the Claim to retrieve.
* @return a non-null Claim.
*/
Claim getHeaderClaim(String name);
}