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

Copy Markdown View Source

Client context

Summary

Callbacks

Returns client authorized scopes. The scopes will be granted for every requests to the given client.

Returns all clients jwk public keys

Callbacks

authorized_scopes(client)

@callback authorized_scopes(client :: Backplane.Oauth.Client.t()) :: [
  Backplane.Oauth.Scope.t()
]

Returns client authorized scopes. The scopes will be granted for every requests to the given client.

get_client(id)

@callback get_client(id :: any()) :: client :: Backplane.Oauth.Client.t() | nil

Returns a Backplane.Oauth.Client given id.

list_clients_jwk()

(optional)
@callback list_clients_jwk() :: [%JOSE.JWK{fields: term(), keys: term(), kty: term()}]

Returns all clients jwk public keys