org.pac4j.http4s

Members list

Type members

Classlikes

class CacheSessionRepository[F[_]] extends SessionRepository[F]

Attributes

Supertypes
class Object
trait Matchable
class Any
class CallbackService[F[_]](config: Config, contextBuilder: () => F, defaultUrl: Option[String], renewSession: Boolean, defaultClient: Option[String])(implicit evidence$1: Sync[F])

Http4s Service to handle callback from after login

Http4s Service to handle callback from after login

This is required for web sites where a user logs in, get's redirected to another site to login (e.g. facebook, google etc) and then that site redirects the user back to the original site at a callback handled by this service.

Attributes

Supertypes
class Object
trait Matchable
class Any
class DefaultHttpActionAdapter[F <: ([_] =>> AnyRef)] extends HttpActionAdapter

DefaultHttpActionAdapter sets the correct status codes on the response.

DefaultHttpActionAdapter sets the correct status codes on the response.

Attributes

Supertypes
trait HttpActionAdapter
class Object
trait Matchable
class Any
class DefaultSecurityGrantedAccessAdapter[F <: ([_] =>> AnyRef)](service: AuthedRoutes[List[CommonProfile], F])(implicit evidence$1: Sync[F]) extends SecurityGrantedAccessAdapter

DefaultSecurityGrantedAccessAdapter gets called if user is granted access

DefaultSecurityGrantedAccessAdapter gets called if user is granted access

It should proceed to real request

Value parameters

service

The http4s route that is being protected

Attributes

Supertypes
trait SecurityGrantedAccessAdapter
class Object
trait Matchable
class Any
trait Http4sCookieSessionStore[F[_]] extends SessionStore

Http4sCookieSessionStore is session implementation based on cookies.

Http4sCookieSessionStore is session implementation based on cookies.

All session data is kept in the client cookie (encrypted with the key specified in SessionConfig).

Attributes

Companion
object
Supertypes
trait SessionStore
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class Http4sGenericSessionStore[F[_]](sessionRepository: SessionRepository[F], dispatcher: Dispatcher[F])(maxAge: Option[Int], domain: Option[String], path: Option[String], secure: Boolean, httpOnly: Boolean, sameSite: Option[SameSite])(implicit evidence$1: Sync[F]) extends SessionStore

Http4sGenericSessionStore is a generic session implementation with configurable storage

Http4sGenericSessionStore is a generic session implementation with configurable storage

The cookie will just contain an id and the session data is kept server side in storage.

Value parameters

domain

Domain cookie attribute

httpOnly

HttpOnly cookie attribute

maxAge

Max-Age cookie attribute

path

Path cookie attribute

secure

Secure cookie attribute

Attributes

Supertypes
trait SessionStore
class Object
trait Matchable
class Any
class Http4sWebContext[F[_]](var request: Request[F], bodyExtractor: F[String] => String)(implicit evidence$1: Sync[F]) extends WebContext

Http4sWebContext is the adapter layer to allow Pac4j to interact with Http4s request and response objects.

Http4sWebContext is the adapter layer to allow Pac4j to interact with Http4s request and response objects.

Value parameters

bodyExtractor

function to extract the body from F[]

request

Http4s request object currently being handled

Attributes

Companion
object
Supertypes
trait WebContext
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class LogoutService[F[_]](config: Config, contextBuilder: () => F, defaultUrl: Option[String], logoutUrlPattern: Option[String], localLogout: Boolean, destroySession: Boolean, centralLogout: Boolean)(implicit evidence$1: Sync[F])

Http4s Service to handle user logging out from the website

Http4s Service to handle user logging out from the website

Attributes

Supertypes
class Object
trait Matchable
class Any

SecurityFilterMiddleware is applied to all routes that need authentication and authorisation.

SecurityFilterMiddleware is applied to all routes that need authentication and authorisation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object Session

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Session.type
final case class SessionConfig(cookieName: String, mkCookie: (String, String) => ResponseCookie, secret: List[Byte], maxAge: Duration)

Session Cookie Configuration

Session Cookie Configuration

Value parameters

secret

16 bytes secret for cookie security

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait SessionRepository[F[_]]

Repository trait for customizing Http4sGenericSessionStore.

Repository trait for customizing Http4sGenericSessionStore.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object SessionSyntax

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Deprecated classlikes

class Http4sCacheSessionStore[F[_]](maxAge: Option[Int], domain: Option[String], path: Option[String], secure: Boolean, httpOnly: Boolean, sameSite: Option[SameSite])(implicit evidence$1: Sync[F]) extends SessionStore

Http4sCacheSessionStore is an in memory session implementation.

Http4sCacheSessionStore is an in memory session implementation.

The cookie will just contain an id and the session data is kept server side in cache.

Note that as cache is a simple Map, if multiple web servers are running sticky sessions will be required for this to work.

Value parameters

domain

Domain cookie attribute

httpOnly

HttpOnly cookie attribute

maxAge

Max-Age cookie attribute

path

Path cookie attribute

secure

Secure cookie attribute

Attributes

Deprecated
[Since version 4.4.0]
Supertypes
trait SessionStore
class Object
trait Matchable
class Any

Types

type Http4sContextBuilder[F[_]] = Request[F] => Http4sWebContext[F]
type Session = Json