Backplane.Oauth.TokenApplication behaviour (backplane_oauth v1.10.77)

Copy Markdown View Source

OAuth application behaviour - token endpoint

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

Summary

Callbacks

This function will be triggered in case of failure invoking Backplane.Oauth.token/2

This function will be triggered in case of success invoking Backplane.Oauth.token/2

Callbacks

token_error(conn, oauth_error)

@callback token_error(conn :: Plug.Conn.t(), oauth_error :: Backplane.Oauth.Error.t()) ::
  any()

This function will be triggered in case of failure invoking Backplane.Oauth.token/2

token_success(conn, token_response)

@callback token_success(
  conn :: Plug.Conn.t(),
  token_response :: Backplane.Oauth.TokenResponse.t()
) :: any()

This function will be triggered in case of success invoking Backplane.Oauth.token/2