View Source Boruta.Oauth (Boruta core v2.3.4)
OAuth requests entrypoint, provides authorization artifacts to clients as stated in RFC.
Note: this module follows inverted heaxagonal architecture, its functions will invoke callbacks of the given module argument and return its result.
The definition of those callbacks are provided by either
Boruta.Oauth.Application
orBoruta.Oauth.AuthorizeApplication
,Boruta.Oauth.TokenApplication
,Boruta.Oauth.IntrospectApplication
, andBoruta.Oauth.RevokeApplication
,
Summary
Functions
Process an authorize request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework and OpenID Connect Core 1.0 incorporating errata set 1.
Process a introspect request as stated in RFC 7662 - OAuth 2.0 Token Introspection.
Check success of an authorize request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework and OpenID Connect Core 1.0 incorporating errata set 1.
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.
Functions
@spec authorize( 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 and OpenID Connect Core 1.0 incorporating errata set 1.
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.
@spec 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.
@spec preauthorize( conn :: Plug.Conn.t() | map(), resource_owner :: Boruta.Oauth.ResourceOwner.t(), module :: atom() ) :: any()
Check success of an authorize request as stated in RFC 6749 - The OAuth 2.0 Authorization Framework and OpenID Connect Core 1.0 incorporating errata set 1.
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.
@spec 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.
@spec 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.