Class JwtDecode


  • public class JwtDecode
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      JwtDecode()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.jsonwebtoken.Claims decodeJWT​(java.lang.String jwt)
      Check if JWT is valid, returns Claims if valid else throws Exception
      static boolean isJwtValid​(java.lang.String jwt)
      Check if JWT is valid If JWT valid returns true, else false
      • Methods inherited from class java.lang.Object

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

      • JwtDecode

        public JwtDecode()
    • Method Detail

      • isJwtValid

        public static boolean isJwtValid​(java.lang.String jwt)
        Check if JWT is valid If JWT valid returns true, else false
        Parameters:
        jwt - JWT to check
        Returns:
        true if JWT valid, else false
      • decodeJWT

        public static io.jsonwebtoken.Claims decodeJWT​(java.lang.String jwt)
                                                throws io.jsonwebtoken.ExpiredJwtException,
                                                       io.jsonwebtoken.UnsupportedJwtException,
                                                       io.jsonwebtoken.MalformedJwtException,
                                                       io.jsonwebtoken.SignatureException,
                                                       java.lang.IllegalArgumentException
        Check if JWT is valid, returns Claims if valid else throws Exception
        Parameters:
        jwt - JWT to validate
        Returns:
        Claims
        Throws:
        io.jsonwebtoken.ExpiredJwtException - ExpiredJwtException
        io.jsonwebtoken.UnsupportedJwtException - UnsupportedJwtException
        io.jsonwebtoken.MalformedJwtException - MalformedJwtException
        io.jsonwebtoken.SignatureException - SignatureException
        java.lang.IllegalArgumentException - IllegalArgumentException