CPub.Web.Authorization.Utils (CPub v0.3.0) View Source
Helpers and utils for dealing with OAuth 2.0 Endpoint requests.
Link to this section Summary
Functions
Returns the CPub.Web.Authorization.Client
associated with the connection.
Returns a valid redirect_uri for given connection and client/authorization.
Returns a valid scope for given connection and client
Returns OAuth 2.0 request state from connection
Link to this section Functions
Specs
get_client(Plug.Conn.t()) :: {:ok, CPub.Web.Authorization.Client.t()} | {:error, any(), any()}
Returns the CPub.Web.Authorization.Client
associated with the connection.
Specs
get_client_credentials(Plug.Conn.t()) :: {String.t(), String.t()}
Specs
get_redirect_uri(Plug.Conn.t(), CPub.Web.Authorization.Client.t()) :: {:ok, URI.t()} | {:error, any(), any()}
Returns a valid redirect_uri for given connection and client/authorization.
Specs
get_scope(Plug.Conn.t(), CPub.Web.Authorization.Client.t()) :: {:ok, [atom()]} | {:error, any(), any()}
Returns a valid scope for given connection and client
Specs
get_state(Plug.Conn.t()) :: {:ok, String.t()}
Returns OAuth 2.0 request state from connection