View Source AshAuthentication.Phoenix.Plug (ash_authentication_phoenix v2.4.2)
Helper plugs mixed in to your router.
When you use AshAuthentication.Phoenix.Router
this module is included, so
that you can use these plugs in your pipelines.
Summary
Functions
Attempt to retrieve actors from the Authorization
header(s).
Attempt to retrieve all actors from the connections' session.
Revoke all token(s) in the Authorization
header(s).
Store the actor in the connections' session.
Functions
@spec load_from_bearer( Plug.Conn.t(), keyword() ) :: Plug.Conn.t()
Attempt to retrieve actors from the Authorization
header(s).
A wrapper around AshAuthentication.Plug.Helpers.retrieve_from_bearer/2
with
the otp_app
as extracted from the endpoint.
@spec load_from_session( Plug.Conn.t(), keyword() ) :: Plug.Conn.t()
Attempt to retrieve all actors from the connections' session.
A wrapper around AshAuthentication.Plug.Helpers.retrieve_from_session/2
with the otp_app
as extracted from the endpoint.
@spec revoke_bearer_tokens(Plug.Conn.t(), any()) :: Plug.Conn.t()
Revoke all token(s) in the Authorization
header(s).
A wrapper around AshAuthentication.Plug.Helpers.revoke_bearer_tokens/2
with
the otp_app
as extracted from the endpoint.
@spec store_in_session(Plug.Conn.t(), Ash.Resource.record()) :: Plug.Conn.t()
Store the actor in the connections' session.