pdi.jwt

JwtCore

trait JwtCore[H, C] extends AnyRef

Provide the main logic around Base64 encoding / decoding and signature using the correct algorithm. H and C types are respesctively the header type and the claim type. For the core project, they will be String but you are free to extend this trait using other types like JsObject or anything else.

Please, check implementations, like Jwt, for code samples.

H

the type of the extracted header from a JSON Web Token

C

the type of the extracted claim from a JSON Web Token

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JwtCore
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def extractAlgorithm(header: H): Option[JwtAlgorithm]

    Attributes
    protected
  2. abstract def extractExpiration(claim: C): Option[Long]

    Attributes
    protected
  3. abstract def extractNotBefore(claim: C): Option[Long]

    Attributes
    protected
  4. abstract def parseClaim(claim: String): C

    Attributes
    protected
  5. abstract def parseHeader(header: String): H

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def decode(token: String, key: PublicKey): Try[C]

  9. def decode(token: String, key: PublicKey, options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    returns

    if successful, the claim of the token in its correct type

  10. def decode(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm]): Try[C]

  11. def decode(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, the claim of the token in its correct type

  12. def decode(token: String, key: SecretKey): Try[C]

  13. def decode(token: String, key: SecretKey, options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    returns

    if successful, the claim of the token in its correct type

  14. def decode(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm]): Try[C]

  15. def decode(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, the claim of the token in its correct type

  16. def decode(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm]): Try[C]

  17. def decode(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, the claim of the token in its correct type

  18. def decode(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm]): Try[C]

  19. def decode(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, the claim of the token in its correct type

  20. def decode(token: String): Try[C]

  21. def decode(token: String, options: JwtOptions): Try[C]

    Same as decodeAll but only return the claim

    Same as decodeAll but only return the claim

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    returns

    if successful, the claim of the token in its correct type

  22. def decodeAll(token: String, key: PublicKey): Try[(H, C, String)]

  23. def decodeAll(token: String, key: PublicKey, options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  24. def decodeAll(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm]): Try[(H, C, String)]

  25. def decodeAll(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  26. def decodeAll(token: String, key: SecretKey): Try[(H, C, String)]

  27. def decodeAll(token: String, key: SecretKey, options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  28. def decodeAll(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm]): Try[(H, C, String)]

  29. def decodeAll(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  30. def decodeAll(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm]): Try[(H, C, String)]

  31. def decodeAll(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  32. def decodeAll(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm]): Try[(H, C, String)]

  33. def decodeAll(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  34. def decodeAll(token: String): Try[(H, C, String)]

  35. def decodeAll(token: String, options: JwtOptions): Try[(H, C, String)]

    Same as decodeRawAll but return the real header and claim types

    Same as decodeRawAll but return the real header and claim types

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    returns

    if successful, a tuple representing the header, the claim and eventually the signature

  36. def decodeRaw(token: String, key: PublicKey): Try[String]

  37. def decodeRaw(token: String, key: PublicKey, options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    returns

    if successful, a string representing the JSON version of the claim

  38. def decodeRaw(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm]): Try[String]

  39. def decodeRaw(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a string representing the JSON version of the claim

  40. def decodeRaw(token: String, key: SecretKey): Try[String]

  41. def decodeRaw(token: String, key: SecretKey, options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    returns

    if successful, a string representing the JSON version of the claim

  42. def decodeRaw(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm]): Try[String]

  43. def decodeRaw(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a string representing the JSON version of the claim

  44. def decodeRaw(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm]): Try[String]

  45. def decodeRaw(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a string representing the JSON version of the claim

  46. def decodeRaw(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm]): Try[String]

  47. def decodeRaw(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a string representing the JSON version of the claim

  48. def decodeRaw(token: String): Try[String]

  49. def decodeRaw(token: String, options: JwtOptions): Try[String]

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    Same as decodeRawAll but only return the claim (you only care about the claim most of the time)

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    returns

    if successful, a string representing the JSON version of the claim

  50. def decodeRawAll(token: String, key: PublicKey): Try[(String, String, String)]

  51. def decodeRawAll(token: String, key: PublicKey, options: JwtOptions): Try[(String, String, String)]

  52. def decodeRawAll(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm]): Try[(String, String, String)]

  53. def decodeRawAll(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[(String, String, String)]

    Will try to decode a JSON Web Token to raw strings using an asymetric algorithm

    Will try to decode a JSON Web Token to raw strings using an asymetric algorithm

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple of 3 strings, the header, the claim and the signature

  54. def decodeRawAll(token: String, key: SecretKey): Try[(String, String, String)]

  55. def decodeRawAll(token: String, key: SecretKey, options: JwtOptions): Try[(String, String, String)]

  56. def decodeRawAll(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm]): Try[(String, String, String)]

  57. def decodeRawAll(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[(String, String, String)]

    Will try to decode a JSON Web Token to raw strings using a HMAC algorithm

    Will try to decode a JSON Web Token to raw strings using a HMAC algorithm

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple of 3 strings, the header, the claim and the signature

  58. def decodeRawAll(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm]): Try[(String, String, String)]

  59. def decodeRawAll(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Try[(String, String, String)]

    Will try to decode a JSON Web Token to raw strings using an asymetric algorithm

    Will try to decode a JSON Web Token to raw strings using an asymetric algorithm

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple of 3 strings, the header, the claim and the signature

  60. def decodeRawAll(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm]): Try[(String, String, String)]

  61. def decodeRawAll(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Try[(String, String, String)]

    Will try to decode a JSON Web Token to raw strings using a HMAC algorithm

    Will try to decode a JSON Web Token to raw strings using a HMAC algorithm

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    if successful, a tuple of 3 strings, the header, the claim and the signature

  62. def decodeRawAll(token: String): Try[(String, String, String)]

  63. def decodeRawAll(token: String, options: JwtOptions): Try[(String, String, String)]

    Will try to decode a JSON Web Token to raw strings

    Will try to decode a JSON Web Token to raw strings

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    returns

    if successful, a tuple of 3 strings, the header, the claim and the signature

  64. def encode(header: JwtHeader, claim: JwtClaim, key: Key): String

    An alias of encode if you only want to pass a string as the key, the algorithm will be deduced from the header.

    An alias of encode if you only want to pass a string as the key, the algorithm will be deduced from the header.

    header

    the header to stringify as a JSON before encoding the token

    claim

    the claim to stringify as a JSON before encoding the token

    key

    the secret key to use to sign the token (note that the algorithm will be deduced from the header)

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  65. def encode(header: JwtHeader, claim: JwtClaim, key: String): String

    An alias of encode if you only want to pass a string as the key, the algorithm will be deduced from the header.

    An alias of encode if you only want to pass a string as the key, the algorithm will be deduced from the header.

    header

    the header to stringify as a JSON before encoding the token

    claim

    the claim to stringify as a JSON before encoding the token

    key

    the secret key to use to sign the token (note that the algorithm will be deduced from the header)

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  66. def encode(header: JwtHeader, claim: JwtClaim): String

    An alias to encode if you want to use case classes for the header and the claim rather than strings, they will just be stringified to JSON format.

    An alias to encode if you want to use case classes for the header and the claim rather than strings, they will just be stringified to JSON format.

    header

    the header to stringify as a JSON before encoding the token

    claim

    the claim to stringify as a JSON before encoding the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  67. def encode(claim: JwtClaim, key: PrivateKey, algorithm: JwtAsymetricAlgorithm): String

    An alias to encode which will provide an automatically generated header and use the claim as a case class.

    An alias to encode which will provide an automatically generated header and use the claim as a case class.

    claim

    the claim of the JSON Web Token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  68. def encode(claim: JwtClaim, key: SecretKey, algorithm: JwtHmacAlgorithm): String

    An alias to encode which will provide an automatically generated header and use the claim as a case class.

    An alias to encode which will provide an automatically generated header and use the claim as a case class.

    claim

    the claim of the JSON Web Token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  69. def encode(claim: JwtClaim, key: String, algorithm: JwtAlgorithm): String

    An alias to encode which will provide an automatically generated header and use the claim as a case class.

    An alias to encode which will provide an automatically generated header and use the claim as a case class.

    claim

    the claim of the JSON Web Token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  70. def encode(claim: JwtClaim): String

    An alias to encode which will provide an automatically generated header and setting both key and algorithm to None.

    An alias to encode which will provide an automatically generated header and setting both key and algorithm to None.

    claim

    the claim of the JSON Web Token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  71. def encode(claim: String, key: PrivateKey, algorithm: JwtAsymetricAlgorithm): String

    An alias to encode which will provide an automatically generated header and allowing you to get rid of Option for the key and the algorithm.

    An alias to encode which will provide an automatically generated header and allowing you to get rid of Option for the key and the algorithm.

    claim

    a valid stringified JSON representing the claim of the token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  72. def encode(claim: String, key: SecretKey, algorithm: JwtHmacAlgorithm): String

    An alias to encode which will provide an automatically generated header and allowing you to get rid of Option for the key and the algorithm.

    An alias to encode which will provide an automatically generated header and allowing you to get rid of Option for the key and the algorithm.

    claim

    a valid stringified JSON representing the claim of the token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  73. def encode(claim: String, key: String, algorithm: JwtAlgorithm): String

    An alias to encode which will provide an automatically generated header and allowing you to get rid of Option for the key and the algorithm.

    An alias to encode which will provide an automatically generated header and allowing you to get rid of Option for the key and the algorithm.

    claim

    a valid stringified JSON representing the claim of the token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  74. def encode(claim: String): String

    An alias to encode which will provide an automatically generated header.

    An alias to encode which will provide an automatically generated header.

    claim

    a valid stringified JSON representing the claim of the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  75. def encode(header: String, claim: String, key: PrivateKey, algorithm: JwtAsymetricAlgorithm): String

  76. def encode(header: String, claim: String, key: SecretKey, algorithm: JwtHmacAlgorithm): String

  77. def encode(header: String, claim: String, key: String, algorithm: JwtAlgorithm): String

    Encode a JSON Web Token from its different parts.

    Encode a JSON Web Token from its different parts. Both the header and the claim will be encoded to Base64 url-safe, then a signature will be eventually generated from it if you did pass a key and an algorithm, and finally, those three parts will be merged as a single string, using dots as separator.

    header

    a valid stringified JSON representing the header of the token

    claim

    a valid stringified JSON representing the claim of the token

    key

    the key that will be used to check the token signature

    algorithm

    the algorithm to sign the token

    returns

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

  78. def encode(header: String, claim: String): String

  79. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  80. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  81. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  82. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  83. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  84. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  85. def isValid(token: String, key: PublicKey): Boolean

  86. def isValid(token: String, key: PublicKey, options: JwtOptions): Boolean

  87. def isValid(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm]): Boolean

  88. def isValid(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Boolean

    An alias for isValid if you want to directly pass a string as the key

    An alias for isValid if you want to directly pass a string as the key

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    a boolean value indicating if the token is valid or not

  89. def isValid(token: String, key: SecretKey): Boolean

  90. def isValid(token: String, key: SecretKey, options: JwtOptions): Boolean

  91. def isValid(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm]): Boolean

  92. def isValid(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Boolean

    An alias for isValid if you want to directly pass a string as the key

    An alias for isValid if you want to directly pass a string as the key

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    a boolean value indicating if the token is valid or not

  93. def isValid(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm]): Boolean

  94. def isValid(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Boolean

    An alias for isValid if you want to directly pass a string as the key for asymetric algorithms

    An alias for isValid if you want to directly pass a string as the key for asymetric algorithms

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    a boolean value indicating if the token is valid or not

  95. def isValid(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm]): Boolean

  96. def isValid(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Boolean

    An alias for isValid if you want to directly pass a string as the key for HMAC algorithms

    An alias for isValid if you want to directly pass a string as the key for HMAC algorithms

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    returns

    a boolean value indicating if the token is valid or not

  97. def isValid(token: String): Boolean

  98. def isValid(token: String, options: JwtOptions): Boolean

    Test if a token is valid.

    Test if a token is valid. Doesn't throw any exception.

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    returns

    a boolean value indicating if the token is valid or not

  99. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  100. final def notify(): Unit

    Definition Classes
    AnyRef
  101. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  102. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  103. def toString(): String

    Definition Classes
    AnyRef → Any
  104. def validate(token: String, key: PublicKey): Unit

  105. def validate(token: String, key: PublicKey, options: JwtOptions): Unit

  106. def validate(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm]): Unit

  107. def validate(token: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Unit

    An alias of validate in case you want to directly pass a string key.

    An alias of validate in case you want to directly pass a string key.

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    Exceptions thrown
    IllegalArgumentException

    couldn't decode the token since it's not a valid base64 string

    JwtExpirationException

    the token isn't valid anymore because its expiration attribute is in the past

    JwtLengthException

    the number of parts separated by dots is wrong

    JwtNotBeforeException

    the token isn't valid yet because its notBefore attribute is in the future

    JwtValidationException

    default validation exeption

  108. def validate(token: String, key: SecretKey): Unit

  109. def validate(token: String, key: SecretKey, options: JwtOptions): Unit

  110. def validate(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm]): Unit

  111. def validate(token: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Unit

    An alias of validate in case you want to directly pass a string key.

    An alias of validate in case you want to directly pass a string key.

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    Exceptions thrown
    IllegalArgumentException

    couldn't decode the token since it's not a valid base64 string

    JwtExpirationException

    the token isn't valid anymore because its expiration attribute is in the past

    JwtLengthException

    the number of parts separated by dots is wrong

    JwtNotBeforeException

    the token isn't valid yet because its notBefore attribute is in the future

    JwtValidationException

    default validation exeption

  112. def validate(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm]): Unit

  113. def validate(token: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Unit

    An alias of validate in case you want to directly pass a string key for asymetric algorithms.

    An alias of validate in case you want to directly pass a string key for asymetric algorithms.

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    Exceptions thrown
    IllegalArgumentException

    couldn't decode the token since it's not a valid base64 string

    JwtExpirationException

    the token isn't valid anymore because its expiration attribute is in the past

    JwtLengthException

    the number of parts separated by dots is wrong

    JwtNotBeforeException

    the token isn't valid yet because its notBefore attribute is in the future

    JwtValidationException

    default validation exeption

  114. def validate(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm]): Unit

  115. def validate(token: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Unit

    An alias of validate in case you want to directly pass a string key for HMAC algorithms.

    An alias of validate in case you want to directly pass a string key for HMAC algorithms.

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    key

    the key that will be used to check the token signature

    algorithms

    a list of possible algorithms that the token can use. See Security concerns for more infos.

    Exceptions thrown
    IllegalArgumentException

    couldn't decode the token since it's not a valid base64 string

    JwtExpirationException

    the token isn't valid anymore because its expiration attribute is in the past

    JwtLengthException

    the number of parts separated by dots is wrong

    JwtNotBeforeException

    the token isn't valid yet because its notBefore attribute is in the future

    JwtValidationException

    default validation exeption

  116. def validate(token: String): Unit

  117. def validate(token: String, options: JwtOptions): Unit

    Valid a token: doesn't return anything but will thrown exceptions if there are any errors.

    Valid a token: doesn't return anything but will thrown exceptions if there are any errors.

    token

    a JSON Web Token as a Base64 url-safe encoded String which can be used inside an HTTP header

    Exceptions thrown
    IllegalArgumentException

    couldn't decode the token since it's not a valid base64 string

    JwtExpirationException

    the token isn't valid anymore because its expiration attribute is in the past

    JwtLengthException

    the number of parts separated by dots is wrong

    JwtNotBeforeException

    the token isn't valid yet because its notBefore attribute is in the future

    JwtValidationException

    default validation exeption

  118. def validate(header64: String, header: H, claim64: String, claim: C, signature: String, key: PublicKey, algorithms: Seq[JwtAsymetricAlgorithm], options: JwtOptions): Unit

    Attributes
    protected
  119. def validate(header64: String, header: H, claim64: String, claim: C, signature: String, key: SecretKey, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Unit

    Attributes
    protected
  120. def validate(header64: String, header: H, claim64: String, claim: C, signature: String, key: String, algorithms: ⇒ Seq[JwtAsymetricAlgorithm], options: JwtOptions): Unit

    Attributes
    protected
  121. def validate(header64: String, header: H, claim64: String, claim: C, signature: String, key: String, algorithms: Seq[JwtHmacAlgorithm], options: JwtOptions): Unit

    Attributes
    protected
  122. def validate(header64: String, header: H, claim64: String, claim: C, signature: String, options: JwtOptions, verify: (Array[Byte], Array[Byte], JwtAlgorithm) ⇒ Boolean): Unit

    Attributes
    protected
  123. def validate(header: H, claim: C, signature: String, options: JwtOptions): Unit

    Attributes
    protected
  124. def validateAsymetricAlgorithm(algorithm: JwtAsymetricAlgorithm, algorithms: Seq[JwtAsymetricAlgorithm]): Boolean

    Attributes
    protected
  125. def validateHmacAlgorithm(algorithm: JwtHmacAlgorithm, algorithms: Seq[JwtHmacAlgorithm]): Boolean

    Attributes
    protected
  126. def validateTiming(claim: C, options: JwtOptions): Unit

    Attributes
    protected
  127. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  128. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  129. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped