Boruta.Oauth.Application behaviour (Boruta core v2.0.0-rc.1) View Source
OAuth application behaviour
Implement this behaviour in the application layer of your OAuth provider. This behaviour gives all callbacks that are triggered invoking Boruta.Oauth
module functions. Boruta.Oauth.AuthorizeApplication
, Boruta.Oauth.TokenApplication
, Boruta.Oauth.IntrospectApplication
, and Boruta.Oauth.RevokeApplication
are here to implement the different Oauth endpoints separatly.
Link to this section Summary
Callbacks
This function will be triggered in case of failure invoking Boruta.Oauth.authorize/3
This function will be triggered in case of success invoking Boruta.Oauth.authorize/3
This function will be triggered in case of failure invoking Boruta.Oauth.introspect/2
This function will be triggered in case of success invoking Boruta.Oauth.introspect/2
This function will be triggered in case of failure invoking Boruta.Oauth.preauthorize/3
This function will be triggered in case of success invoking Boruta.Oauth.preauthorize/3
This function will be triggered in case of failure invoking Boruta.Oauth.revoke/2
This function will be triggered in case of success invoking Boruta.Oauth.revoke/2
This function will be triggered in case of failure invoking Boruta.Oauth.token/2
This function will be triggered in case of success invoking Boruta.Oauth.token/2
Link to this section Callbacks
Specs
authorize_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) :: any()
This function will be triggered in case of failure invoking Boruta.Oauth.authorize/3
Specs
authorize_success( conn :: Plug.Conn.t(), authorize_response :: Boruta.Oauth.AuthorizeResponse.t() ) :: any()
This function will be triggered in case of success invoking Boruta.Oauth.authorize/3
Specs
introspect_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) :: any()
This function will be triggered in case of failure invoking Boruta.Oauth.introspect/2
Specs
introspect_success( conn :: Plug.Conn.t(), introspect_response :: Boruta.Oauth.IntrospectResponse.t() ) :: any()
This function will be triggered in case of success invoking Boruta.Oauth.introspect/2
Specs
preauthorize_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) :: any()
This function will be triggered in case of failure invoking Boruta.Oauth.preauthorize/3
Specs
preauthorize_success( conn :: Plug.Conn.t(), authorization :: %Boruta.Oauth.AuthorizationSuccess{ client: term(), code: term(), code_challenge: term(), code_challenge_method: term(), nonce: term(), redirect_uri: term(), resource_owner: term(), response_types: term(), scope: term(), state: term(), sub: term() } ) :: any()
This function will be triggered in case of success invoking Boruta.Oauth.preauthorize/3
Specs
revoke_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) :: any()
This function will be triggered in case of failure invoking Boruta.Oauth.revoke/2
Specs
revoke_success(conn :: Plug.Conn.t()) :: any()
This function will be triggered in case of success invoking Boruta.Oauth.revoke/2
Specs
token_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) :: any()
This function will be triggered in case of failure invoking Boruta.Oauth.token/2
Specs
token_success( conn :: Plug.Conn.t(), token_response :: Boruta.Oauth.TokenResponse.t() ) :: any()
This function will be triggered in case of success invoking Boruta.Oauth.token/2