uk.gov.hmrc.play.bootstrap.frontend.filters.SessionTimeoutFilter
See theSessionTimeoutFilter companion object
@Singleton
class SessionTimeoutFilter(config: SessionTimeoutFilterConfig, mkSessionId: () => String, clock: () => Instant)(implicit ec: ExecutionContext, val mat: Materializer) extends Filter
Filter that manipulates session data if 'ts' session field is older than configured timeout.
If the 'ts' has expired, we wipe the session, add a new SessionId and update the 'ts'. If the 'ts' doesn't exist, or is invalid, we just wipe the authToken.
This filter clears data on the incoming request, so that the controller does not receive any session information. It also changes the SET-COOKIE header for the outgoing request, so that the browser knows the session has expired.
A white-list of session values are omitted from this process.
Value parameters
- config
-
an instance of
SessionTimeoutFilterConfigrepresenting the various configurable aspects of this class - mat
-
a
Materializerinstance for Play! to use when dealing with the underlying Akka streams
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Filtertrait EssentialFilterclass Objecttrait Matchableclass Any
Members list
In this article