Class 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 JsonWebToken parse​(java.lang.String token, byte[] signingKey)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JwtParser

        public JwtParser()
    • 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.InvalidTokenException
        Fetches claims from a given token.
        Parameters:
        token - the token to fetch the claims from
        signingKey - 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 expired
        io.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)