The Auth Requests API: an alternative to building authorisation URLs
and Pushed Authorisation Requests by hand (see MoneyHub.Auth) - you
send the desired scope/claims to this endpoint with your
client_credentials token, and Moneyhub returns a ready-to-use
authorisation URL.
This trades a little flexibility (you can't customise every OIDC parameter) for convenience, and is useful when you'd rather not construct the PAR request body or sign request objects by hand.
See Auth Requests.
Summary
Functions
Creates an auth request, returning a map that includes a hosted
authorisation "url" to redirect the user's browser to.
Fetches an auth request's current status by id.
Lists all auth requests created by this API client.
Updates an auth request. Requires both auth_requests:read and
auth_requests:write scopes.
Types
@type auth_request() :: map()
Functions
@spec create(MoneyHub.Config.t(), String.t(), map()) :: {:ok, auth_request()} | {:error, MoneyHub.Error.t()}
Creates an auth request, returning a map that includes a hosted
authorisation "url" to redirect the user's browser to.
attrs carries "scope" and (optionally) "claims" - the same
semantics as MoneyHub.Auth.pushed_authorisation_request/2, just
expressed as a plain request body rather than builder options.
@spec get(MoneyHub.Config.t(), String.t(), String.t()) :: {:ok, auth_request()} | {:error, MoneyHub.Error.t()}
Fetches an auth request's current status by id.
@spec list(MoneyHub.Config.t(), String.t()) :: {:ok, [auth_request()]} | {:error, MoneyHub.Error.t()}
Lists all auth requests created by this API client.
@spec update(MoneyHub.Config.t(), String.t(), String.t(), map()) :: {:ok, auth_request()} | {:error, MoneyHub.Error.t()}
Updates an auth request. Requires both auth_requests:read and
auth_requests:write scopes.