Boruta.Oauth.Application behaviour (Boruta core v0.2.1) View Source

OAuth application behaviour

Implement this behaviour in the application layer of your OAuth provider. The callbacks are triggered while calling functions from Boruta.Oauth module.

Link to this section Summary

Callbacks

This function will be triggered in case of failure triggering Boruta.Oauth.authorize/2

This function will be triggered in case of success triggering Boruta.Oauth.authorize/2

This function will be triggered in case of failure triggering Boruta.Oauth.introspect/2

This function will be triggered in case of success triggering Boruta.Oauth.introspect/2

This function will be triggered in case of failure triggering Boruta.Oauth.revoke/2

This function will be triggered in case of success triggering Boruta.Oauth.revoke/2

This function will be triggered in case of failure triggering Boruta.Oauth.token/2

This function will be triggered in case of success triggering Boruta.Oauth.token/2

Link to this section Callbacks

Link to this callback

authorize_error(conn, oauth_error)

View Source

Specs

authorize_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) ::
  any()

This function will be triggered in case of failure triggering Boruta.Oauth.authorize/2

Link to this callback

authorize_success(conn, token)

View Source

Specs

authorize_success(
  conn :: Plug.Conn.t(),
  token :: Boruta.Oauth.AuthorizeResponse.t()
) :: any()

This function will be triggered in case of success triggering Boruta.Oauth.authorize/2

Link to this callback

introspect_error(conn, oauth_error)

View Source

Specs

introspect_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) ::
  any()

This function will be triggered in case of failure triggering Boruta.Oauth.introspect/2

Link to this callback

introspect_success(conn, token)

View Source

Specs

introspect_success(
  conn :: Plug.Conn.t(),
  token :: Boruta.Oauth.IntrospectResponse.t()
) :: any()

This function will be triggered in case of success triggering Boruta.Oauth.introspect/2

Link to this callback

revoke_error(conn, oauth_error)

View Source

Specs

revoke_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) ::
  any()

This function will be triggered in case of failure triggering Boruta.Oauth.revoke/2

Specs

revoke_success(conn :: Plug.Conn.t()) :: any()

This function will be triggered in case of success triggering Boruta.Oauth.revoke/2

Link to this callback

token_error(conn, oauth_error)

View Source

Specs

token_error(conn :: Plug.Conn.t(), oauth_error :: Boruta.Oauth.Error.t()) ::
  any()

This function will be triggered in case of failure triggering Boruta.Oauth.token/2

Link to this callback

token_success(conn, token)

View Source

Specs

token_success(conn :: Plug.Conn.t(), token :: Boruta.Oauth.TokenResponse.t()) ::
  any()

This function will be triggered in case of success triggering Boruta.Oauth.token/2