p

pdi

jwt

package jwt

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package algorithms
  2. package exceptions

Type Members

  1. class Jwt extends JwtCore[JwtHeader, JwtClaim]
  2. sealed trait JwtAlgorithm extends AnyRef
  3. class JwtArgonaut extends JwtArgonautParser[JwtHeader, JwtClaim]
  4. trait JwtArgonautParser[H, C] extends JwtJsonCommon[Json, H, C]
  5. class JwtCirce extends JwtCirceParser[JwtHeader, JwtClaim]
  6. trait JwtCirceParser[H, C] extends JwtJsonCommon[Json, H, C]

    Implementation of JwtCore using Json from Circe.

  7. class JwtClaim extends AnyRef
  8. trait JwtCore[H, C] extends AnyRef

    Provide the main logic around Base64 encoding / decoding and signature using the correct algorithm.

    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

  9. class JwtHeader extends AnyRef
  10. class JwtJson extends JwtJsonParser[JwtHeader, JwtClaim]
  11. class JwtJson4s extends JwtJson4sParser[JwtHeader, JwtClaim]
  12. trait JwtJson4sImplicits extends AnyRef
  13. trait JwtJson4sParser[H, C] extends JwtJson4sCommon[H, C] with JwtJson4sImplicits

    Implementation of JwtCore using JObject from Json4s Native.

    Implementation of JwtCore using JObject from Json4s Native.

    To see a full list of samples, check the online documentation.

  14. trait JwtJsonImplicits extends AnyRef
  15. trait JwtJsonParser[H, C] extends JwtJsonCommon[JsObject, H, C] with JwtJsonImplicits

    Implementation of JwtCore using JsObject from Play JSON.

    Implementation of JwtCore using JsObject from Play JSON.

    To see a full list of samples, check the online documentation.

  16. case class JwtOptions(signature: Boolean = true, expiration: Boolean = true, notBefore: Boolean = true, leeway: Long = 0) extends Product with Serializable
  17. trait JwtPlayImplicits extends AnyRef
  18. case class JwtSession(headerData: JsObject, claimData: JsObject, signature: String)(implicit conf: Configuration, clock: Clock) extends Product with Serializable

    Similar to the default Play Session but using JsObject instead of Map[String, String].

    Similar to the default Play Session but using JsObject instead of Map[String, String]. The data is separated into two attributes: headerData and claimData. There is also a optional signature. Most of the time, you should only care about the claimData which stores the claim of the token containing the custom values you eventually put in it. That's why all methods of JwtSession (such as add and removing values) only modifiy the claimData.

    To see a full list of samples, check the online documentation.

    Warning Be aware that if you override the claimData (using withClaim for example), you might override some attributes that were automatically put inside the claim such as the expiration of the token.

  19. class JwtUpickle extends JwtUpickleParser[JwtHeader, JwtClaim]
  20. trait JwtUpickleImplicits extends AnyRef
  21. trait JwtUpickleParser[H, C] extends JwtJsonCommon[Value, H, C] with JwtUpickleImplicits

    Implementation of JwtCore using Js.Value from uPickle.

    Implementation of JwtCore using Js.Value from uPickle.

    To see a full list of samples, check the online documentation.

  22. class JwtZIOJson extends JwtZIOJsonParser[JwtHeader, JwtClaim]
  23. trait JwtZIOJsonParser[H, C] extends JwtJsonCommon[Json, H, C]

Value Members

  1. object Jwt extends Jwt

    Test implementation of JwtCore using only Strings.

    Test implementation of JwtCore using only Strings. Most of the time, you should use a lib implementing JSON and shouldn't be using this object. But just in case you need pure Scala support, here it is.

    To see a full list of samples, check the online documentation.

    Warning: since there is no JSON support in Scala, this object doesn't have any way to parse a JSON string as an AST, so it only uses regex with all the limitations it implies. Try not to use keys like exp and nbf in sub-objects of the claim. For example, if you try to use the following claim: {"user":{"exp":1},"exp":1300819380}, it should be correct but it will fail because the regex extracting the expiration will return 1 instead of 1300819380. Sorry about that.

  2. object JwtAlgorithm
  3. object JwtArgonaut extends JwtArgonaut
  4. object JwtArrayUtils
  5. object JwtBase64
  6. object JwtCirce extends JwtCirce
  7. object JwtClaim
  8. object JwtHeader
  9. object JwtJson extends JwtJson
  10. object JwtJson4s extends JwtJson4s
  11. object JwtOptions extends Serializable
  12. object JwtSession extends JwtJsonImplicits with JwtPlayImplicits with Serializable
  13. object JwtTime

    Util object to handle time operations

  14. object JwtUpickle extends JwtUpickle
  15. object JwtUtils
  16. object JwtZIOJson extends JwtZIOJson

Ungrouped