Boruta core v0.1.0-rc.4 Boruta.Oauth.Application behaviour 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.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
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
authorize_success(conn :: Plug.Conn.t(), token :: Boruta.Oauth.Token.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
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
introspect_success(conn :: Plug.Conn.t(), token :: Boruta.Oauth.Token.t()) ::
  any()

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

Link to this callback

token_error(conn, oauth_error)

View Source
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
token_success(conn :: Plug.Conn.t(), token :: Boruta.Oauth.Token.t()) :: any()

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