Skip to main content

Module helpers

Module helpers 

Source

Enums§

ClientAuthError
Why a client failed to authenticate against its client_id/client_secret.

Functions§

authenticate_oauth_client
Looks up a client by client_id and, if it is confidential, verifies provided_secret against its stored digest with a constant-time comparison.
oauth_error
An OAuth error response (RFC 6749 §4.1.2.1, §5.2). With redirect, which must be a redirect URI verified for the client, it is sent to the client as a redirect; otherwise it is answered as JSON.
oauth_invalid_client
invalid_client: the client could not be authenticated.
oauth_invalid_grant
invalid_grant: the authorization code, refresh token or device code is invalid, expired or revoked.
oauth_invalid_request
oauth_invalid_scope
invalid_scope: the requested scope is invalid, unknown or exceeds what is allowed.
oauth_invalid_token
invalid_token for a request to a protected resource (RFC 6750 §3.1).
oauth_server_error
A server_error answered as JSON, keeping the internal cause for the logs.
oauth_unauthorized_client
unauthorized_client: the client may not use this grant type.
ok_json_no_cache
scope_has_openid
split_and_validate_scopes
Splits a space-delimited scope string and checks every element against allowed.