View Source Boruta.Openid.Application behaviour (Boruta core v2.3.3)
Implement this behaviour in the application layer of your OpenID Connect provider.
This behaviour gives all callbacks triggered invoking Boruta.Openid
module functions.
Note: This behaviour is split into
Boruta.Openid.JwksApplication
andBoruta.Openid.UserinfoApplication
providing utilities to implement the different OpenID Connect endpoints independently.
Summary
Callbacks
This function will be triggered when request is unauthorized invoking Boruta.Openid.register_client/3
This function will be triggered in case of success invoking Boruta.Openid.jwks/2
This function will be triggered when request is unauthorized invoking Boruta.Openid.register_client/3
This function will be triggered when request is unauthorized invoking Boruta.Openid.userinfo/2
This function will be triggered in case of success invoking Boruta.Openid.userinfo/2
Callbacks
@callback client_registered(conn :: Plug.Conn.t(), client :: Boruta.Oauth.Client.t()) :: any()
This function will be triggered when request is unauthorized invoking Boruta.Openid.register_client/3
@callback jwk_list( conn :: Plug.Conn.t(), jwk_keys :: [%JOSE.JWK{fields: term(), keys: term(), kty: term()}] ) :: any()
This function will be triggered in case of success invoking Boruta.Openid.jwks/2
@callback registration_failure(conn :: Plug.Conn.t(), changeset :: Ecto.Changeset.t()) :: any()
This function will be triggered when request is unauthorized invoking Boruta.Openid.register_client/3
@callback unauthorized(conn :: Plug.Conn.t(), error :: Boruta.Oauth.Error.t()) :: any()
This function will be triggered when request is unauthorized invoking Boruta.Openid.userinfo/2
@callback userinfo_fetched(conn :: Plug.Conn.t(), userinfo :: map()) :: any()
This function will be triggered in case of success invoking Boruta.Openid.userinfo/2