View Source Boruta.Oauth.Application behaviour (Boruta core v2.1.5)

Implement this behaviour in the application layer of your OAuth / OpenID Connect provider. This behaviour gives all callbacks triggered invoking Boruta.Oauth module functions.

Note: This behaviour is splitted into Boruta.Oauth.AuthorizeApplication, Boruta.Oauth.TokenApplication, Boruta.Oauth.IntrospectApplication, and Boruta.Oauth.RevokeApplication providing utilities to implement the different OAuth / OpenID Connect endpoints independently.

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

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 invoking Boruta.Oauth.authorize/3

Link to this callback

authorize_success( conn, authorize_response )

View Source

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

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 invoking Boruta.Oauth.introspect/2

Link to this callback

introspect_success( conn, introspect_response )

View Source

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

Link to this callback

preauthorize_error(conn, oauth_error)

View Source (optional)

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

Link to this callback

preauthorize_success( conn, authorization )

View Source (optional)

Specs

preauthorize_success(
  conn :: Plug.Conn.t(),
  authorization :: Boruta.Oauth.AuthorizationSuccess.t()
) :: any()

This function will be triggered in case of success invoking Boruta.Oauth.preauthorize/3

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 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

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 invoking Boruta.Oauth.token/2

Link to this callback

token_success(conn, token_response)

View Source

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