JwtPlayImplicits
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object JwtSession.type
Members list
Type members
Classlikes
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
- Supertypes
-
class Objecttrait Matchableclass Any
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
- Supertypes
-
class Objecttrait Matchableclass Any
Implicits
Implicits
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
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
}
}