JwtSession

pdi.jwt.JwtSession$
See theJwtSession companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
JwtSession.type

Members list

Type members

Inherited classlikes

implicit class RichJwtClaim(claim: JwtClaim)

Attributes

Inherited from:
JwtJsonImplicits
Supertypes
class Object
trait Matchable
class Any
implicit class RichJwtHeader(header: JwtHeader)

Attributes

Inherited from:
JwtJsonImplicits
Supertypes
class Object
trait Matchable
class Any
implicit class RichRequestHeader(request: RequestHeader)(implicit conf: Configuration, clock: Clock)

By adding import pdi.jwt.*, you will implicitely add this method to RequestHeader allowing you to easily retrieve the JwtSession inside your Play application.

By adding import pdi.jwt.*, you will implicitely add this method to RequestHeader allowing you to easily retrieve the JwtSession inside your Play application.

package controllers

import play.api.*
import play.api.mvc.*
import pdi.jwt.*

object Application extends Controller {
 def index = Action { request =>
   val session: JwtSession = request.jwtSession
 }
}

Attributes

Inherited from:
JwtPlayImplicits
Supertypes
class Object
trait Matchable
class Any
implicit class RichResult(result: Result)(implicit conf: Configuration, clock: Clock)

By adding import pdi.jwt.*, you will implicitely add all those methods to Result allowing you to easily manipulate the JwtSession inside your Play application.

By adding import pdi.jwt.*, you will implicitely add all those methods to Result allowing you to easily manipulate the JwtSession inside your Play application.

package controllers

import java.time.Clock
import play.api.*
import play.api.mvc.*
import pdi.jwt.*

object Application extends Controller {
 implicit val clock: Clock = Clock.systemUTC

 def login = Action { implicit request =>
   Ok.addingToJwtSession(("logged", true))
 }

 def logout = Action { implicit request =>
   Ok.withoutJwtSession
 }
}

Attributes

Inherited from:
JwtPlayImplicits
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def ALGORITHM(implicit conf: Configuration): JwtAlgorithm
def MAX_AGE(implicit conf: Configuration): Option[Long]
def TOKEN_PREFIX(implicit conf: Configuration): String
def apply(jsClaim: JsObject)(implicit conf: Configuration, clock: Clock): JwtSession
def apply(fields: (String, JsValueWrapper)*)(implicit conf: Configuration, clock: Clock): JwtSession
def apply(jsHeader: JsObject, jsClaim: JsObject)(implicit conf: Configuration, clock: Clock): JwtSession
def apply(claim: JwtClaim)(implicit conf: Configuration, clock: Clock): JwtSession
def apply(header: JwtHeader, claim: JwtClaim)(implicit conf: Configuration, clock: Clock): JwtSession
def apply(header: JwtHeader, claim: JwtClaim, signature: String)(implicit conf: Configuration, clock: Clock): JwtSession
def defaultClaim(implicit conf: Configuration, clock: Clock): JwtClaim
def defaultHeader(implicit conf: Configuration): JwtHeader
def deserialize(token: String, options: JwtOptions)(implicit conf: Configuration, clock: Clock): JwtSession
def deserialize(token: String)(implicit conf: Configuration, clock: Clock): JwtSession

Implicits

Inherited implicits

final implicit def RichJwtClaim(claim: JwtClaim): RichJwtClaim

Attributes

Inherited from:
JwtJsonImplicits

Attributes

Inherited from:
JwtJsonImplicits
final implicit def RichRequestHeader(request: RequestHeader)(implicit conf: Configuration, clock: Clock): RichRequestHeader

By adding import pdi.jwt.*, you will implicitely add this method to RequestHeader allowing you to easily retrieve the JwtSession inside your Play application.

By adding import pdi.jwt.*, you will implicitely add this method to RequestHeader allowing you to easily retrieve the JwtSession inside your Play application.

package controllers

import play.api.*
import play.api.mvc.*
import pdi.jwt.*

object Application extends Controller {
 def index = Action { request =>
   val session: JwtSession = request.jwtSession
 }
}

Attributes

Inherited from:
JwtPlayImplicits
final implicit def RichResult(result: Result)(implicit conf: Configuration, clock: Clock): RichResult

By adding import pdi.jwt.*, you will implicitely add all those methods to Result allowing you to easily manipulate the JwtSession inside your Play application.

By adding import pdi.jwt.*, you will implicitely add all those methods to Result allowing you to easily manipulate the JwtSession inside your Play application.

package controllers

import java.time.Clock
import play.api.*
import play.api.mvc.*
import pdi.jwt.*

object Application extends Controller {
 implicit val clock: Clock = Clock.systemUTC

 def login = Action { implicit request =>
   Ok.addingToJwtSession(("logged", true))
 }

 def logout = Action { implicit request =>
   Ok.withoutJwtSession
 }
}

Attributes

Inherited from:
JwtPlayImplicits

Attributes

Inherited from:
JwtJsonImplicits

Attributes

Inherited from:
JwtJsonImplicits