pdi.jwt

package pdi.jwt

Members list

Packages

Type members

Classlikes

object Jwt extends Jwt

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.

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.

Attributes

Companion
class
Supertypes
class Jwt
class Object
trait Matchable
class Any
Self type
Jwt.type
class Jwt(val clock: Clock) extends JwtCore[JwtHeader, JwtClaim]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Jwt.type
sealed trait JwtAlgorithm

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ES256.type
object ES384.type
object ES512.type
object Ed25519.type
object EdDSA.type
object RS256.type
object RS384.type
object RS512.type
object HMD5.type
object HS224.type
object HS256.type
object HS384.type
object HS512.type
Show all
object JwtAlgorithm

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object JwtArrayUtils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object JwtBase64

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
JwtBase64.type
object JwtClaim

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
JwtClaim.type
class JwtClaim(val content: String, val issuer: Option[String], val subject: Option[String], val audience: Option[Set[String]], val expiration: Option[Long], val notBefore: Option[Long], val issuedAt: Option[Long], val jwtId: Option[String])

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
trait JwtCore[H, C]

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.

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.

Type parameters

C

the type of the extracted claim from a JSON Web Token

H

the type of the extracted header from a JSON Web Token

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Jwt
object Jwt.type
object JwtHeader

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
JwtHeader.type
class JwtHeader(val algorithm: Option[JwtAlgorithm], val typ: Option[String], val contentType: Option[String], val keyId: Option[String])

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
case class JwtOptions(signature: Boolean, expiration: Boolean, notBefore: Boolean, leeway: Long)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object JwtOptions

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
JwtOptions.type
object JwtTime

Util object to handle time operations

Util object to handle time operations

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
JwtTime.type
object JwtUtils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
JwtUtils.type