Package io.pravega.shared.security.token
Class JwtParser
- java.lang.Object
-
- io.pravega.shared.security.token.JwtParser
-
public class JwtParser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JwtParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>>fetchClaims(java.lang.String token, byte[] signingKey)Fetches claims from a given token.static JsonWebTokenparse(java.lang.String token, byte[] signingKey)
-
-
-
Method Detail
-
fetchClaims
public static java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> fetchClaims(java.lang.String token, byte[] signingKey) throws io.pravega.auth.TokenExpiredException, io.pravega.auth.InvalidTokenExceptionFetches claims from a given token.- Parameters:
token- the token to fetch the claims fromsigningKey- the key that was used for signing the token- Returns:
- a Set view of the mappings contained in this Claims map extracted from the token.
- Throws:
io.pravega.auth.TokenExpiredException- if the token has expiredio.pravega.auth.InvalidTokenException- if any failure in parsing the token, verifying the signature or extracting the claims occurs
-
parse
public static JsonWebToken parse(java.lang.String token, byte[] signingKey)
-
-