View Source KratosPlug (kratos_plug v0.1.0)
Functions for working with kratos sessions. This functionality expects that a kratos session has been previously fetched and stored in Plug.Conn.assigns.
Link to this section Summary
Functions
Returns true when the sessions authenticator assurance level is 0.
Returns true when the sessions authenticator assurance level is 1.
Returns true when the sessions authenticator assurance level is 2.
Returns true when the sessions authenticator assurance level is 3.
Tests the sessions authenticator assurance level.
Returns a conn Plug.Conn with a kratos session attached.
Returns true when the conn has an active Kratos session.
Returns true when the conn has a valid Kratos session.
Link to this section Functions
@spec aal0?(Plug.Conn.t()) :: boolean()
Returns true when the sessions authenticator assurance level is 0.
@spec aal1?(Plug.Conn.t()) :: boolean()
Returns true when the sessions authenticator assurance level is 1.
@spec aal2?(Plug.Conn.t()) :: boolean()
Returns true when the sessions authenticator assurance level is 2.
@spec aal3?(Plug.Conn.t()) :: boolean()
Returns true when the sessions authenticator assurance level is 3.
@spec aal?(Plug.Conn.t(), integer()) :: boolean()
Tests the sessions authenticator assurance level.
@spec assign_session(Plug.Conn.t(), any()) :: Plug.Conn.t()
Returns a conn Plug.Conn with a kratos session attached.
@spec session_active?(Plug.Conn.t()) :: boolean()
Returns true when the conn has an active Kratos session.
@spec session_valid?(Plug.Conn.t()) :: boolean()
Returns true when the conn has a valid Kratos session.
At some point we may wish to add additional checks to this function.
Those future changes will set it apart from KratosPlug.Plug.Api.session_active?/1.