Boruta.Oauth (Boruta core v2.0.0-rc.1) View Source
Boruta OAuth entrypoint, handles OAuth requests.
Note : this module follows inverted heaxagonal architecture, its functions will invoke functions of the given argument module as result. The definition of the callbacks are provided by either
Boruta.Oauth.Application
orBoruta.Oauth.AuthorizeApplication
,Boruta.Oauth.TokenApplication
,Boruta.Oauth.IntrospectApplication
, andBoruta.Oauth.RevokeApplication
,
Link to this section Summary
Functions
Process an authorize request and returns a token as stated in RFC 6749 - The OAuth 2.0 Authorization Framework.
Process a introspect request as stated in RFC 7662 - OAuth 2.0 Token Introspection.
Process an authorize request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework.
Process a revoke request as stated in RFC 7009 - OAuth 2.0 Token Revocation.
Process an token request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework.
Link to this section Functions
Specs
authorize( conn :: Plug.Conn.t() | map(), resource_owner :: Boruta.Oauth.ResourceOwner.t(), module :: atom() ) :: any()
Process an authorize request and returns a token as stated in RFC 6749 - The OAuth 2.0 Authorization Framework.
Triggers authorize_success
in case of success and authorize_error
in case of failure from the given module
. Those functions are described in Boruta.Oauth.Application
behaviour.
Specs
introspect(conn :: Plug.Conn.t() | map(), module :: atom()) :: any()
Process a introspect request as stated in RFC 7662 - OAuth 2.0 Token Introspection.
Triggers introspect_success
in case of success and introspect_error
in case of failure from the given module
. Those functions are described in Boruta.Oauth.Application
behaviour.
Specs
preauthorize( conn :: Plug.Conn.t() | map(), resource_owner :: Boruta.Oauth.ResourceOwner.t(), module :: atom() ) :: any()
Process an authorize request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework.
Triggers preauthorize_success
in case of success and preauthorize_error
in case of failure from the given module
. Those functions are described in Boruta.Oauth.Application
behaviour.
Specs
revoke(conn :: Plug.Conn.t() | map(), module :: atom()) :: any()
Process a revoke request as stated in RFC 7009 - OAuth 2.0 Token Revocation.
Triggers revoke_success
in case of success and revoke_error
in case of failure from the given module
. Those functions are described in Boruta.Oauth.Application
behaviour.
Specs
token(conn :: Plug.Conn.t() | map(), module :: atom()) :: any()
Process an token request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework.
Triggers token_success
in case of success and token_error
in case of failure from the given module
. Those functions are described in Boruta.Oauth.Application
behaviour.