RichRequestHeader

pdi.jwt.JwtPlayImplicits.RichRequestHeader
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.

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

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def hasJwtHeader: Boolean

Check if the request has the JWT header defined

Check if the request has the JWT header defined

Attributes

Return the current JwtSession from the request

Return the current JwtSession from the request

Attributes