Package

pdi

jwt

Permalink

package jwt

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait JwtAlgorithm extends AnyRef

    Permalink
  2. case class JwtClaim(content: String = "{}", issuer: Option[String] = None, subject: Option[String] = None, audience: Option[Set[String]] = None, expiration: Option[Long] = None, notBefore: Option[Long] = None, issuedAt: Option[Long] = None, jwtId: Option[String] = None) extends Product with Serializable

    Permalink
  3. trait JwtCore[H, C] extends AnyRef

    Permalink

    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

  4. case class JwtHeader(algorithm: Option[JwtAlgorithm] = None, typ: Option[String] = None, contentType: Option[String] = None) extends Product with Serializable

    Permalink
  5. case class JwtOptions(signature: Boolean = true, expiration: Boolean = true, notBefore: Boolean = true, leeway: Long = 0) extends Product with Serializable

    Permalink

Value Members

  1. object Jwt extends JwtCore[String, String]

    Permalink

    Default implementation of JwtCore using only Strings.

    Default 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

    Permalink
  3. object JwtBase64 extends JwtBase64Impl

    Permalink
  4. object JwtHeader extends Serializable

    Permalink
  5. object JwtOptions extends Serializable

    Permalink
  6. object JwtTime extends JwtTimeImpl

    Permalink

    Util object to handle time operations

  7. object JwtUtils

    Permalink
  8. package algorithms

    Permalink
  9. package exceptions

    Permalink

Ungrouped