Class JWTParser


  • public final class JWTParser
    extends java.lang.Object
    Parser for unsecured (plain), signed and encrypted JSON Web Tokens (JWTs).
    Version:
    2015-06-14
    Author:
    Vladimir Dzhuvinov, Junya Hayashi
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static JWT parse​(java.lang.String s)
      Parses an unsecured (plain), signed or encrypted JSON Web Token (JWT) from the specified string in compact format.
      • Methods inherited from class java.lang.Object

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

      • parse

        public static JWT parse​(java.lang.String s)
                         throws java.text.ParseException
        Parses an unsecured (plain), signed or encrypted JSON Web Token (JWT) from the specified string in compact format.
        Parameters:
        s - The string to parse. Must not be null.
        Returns:
        The corresponding PlainJWT, SignedJWT or EncryptedJWT instance.
        Throws:
        java.text.ParseException - If the string couldn't be parsed to a valid unsecured, signed or encrypted JWT.