Charon.Utils (Charon v4.2.0)
View SourceUtility functions, mainly getters and setters for module internals.
Summary
Functions
Get auth errors, if present.
Get the bearer token, if present.
Get the payload of the bearer token, if present.
Get current session, if present.
Get token transport mechanism, if present.
Get tokens, if present.
Put an auth error on the conn
Put a session on the conn
Put a token on the conn
Put a token payload on the conn
Functions
@spec get_auth_error(Plug.Conn.t()) :: binary() | nil
Get auth errors, if present.
@spec get_bearer_token(Plug.Conn.t()) :: map() | nil
Get the bearer token, if present.
@spec get_bearer_token_payload(Plug.Conn.t()) :: map() | nil
Get the payload of the bearer token, if present.
@spec get_session(Plug.Conn.t()) :: Charon.Models.Session.t() | nil
Get current session, if present.
@spec get_token_transport(Plug.Conn.t()) :: atom() | nil
Get token transport mechanism, if present.
@spec get_tokens(Plug.Conn.t()) :: Charon.Models.Tokens.t() | nil
Get tokens, if present.
@spec set_auth_error(Plug.Conn.t(), any()) :: Plug.Conn.t()
Put an auth error on the conn
@spec set_session(Plug.Conn.t(), any()) :: Plug.Conn.t()
Put a session on the conn
@spec set_token(Plug.Conn.t(), any()) :: Plug.Conn.t()
Put a token on the conn
@spec set_token_payload(Plug.Conn.t(), any()) :: Plug.Conn.t()
Put a token payload on the conn