Webrizendocs
Integrate your app

Endpoints

All OpenID Connect endpoints live under the issuer, https://accounts.webrizen.com/api/auth. Libraries find them automatically from the discovery document.

Reference

EndpointPathPurpose
Discovery/.well-known/openid-configurationMachine-readable list of everything below
Authorization/oauth2/authorizeStarts sign-in (browser redirect)
Token/oauth2/tokenExchanges codes and refresh tokens for tokens
UserInfo/oauth2/userinfoCurrent profile + org for an access token
JWKS/jwksPublic keys for verifying ID tokens
Introspection/oauth2/introspectBackend check: is this token active, and whose is it?
Revocation/oauth2/revokeInvalidate an access or refresh token
End session/oauth2/end-sessionGlobal sign-out, then redirect to a registered URI
Directory/directory/membersList an organization's members with an app token. See Directory API

Supported values

Discovery fieldValues
response_types_supportedcode
grant_types_supportedauthorization_code, refresh_token, client_credentials
code_challenge_methods_supportedS256
id_token_signing_alg_values_supportedRS256
token_endpoint_auth_methods_supportedclient_secret_basic, client_secret_post, private_key_jwt
prompt_values_supportedlogin, consent, create, select_account, none

Useful prompt values

PromptBehaviour
(none)Silent if already signed in, otherwise show sign-in
loginAlways ask for credentials again, e.g. before a sensitive action
select_accountLet the user choose their organization again
createOpen the sign-up page instead of sign-in
noneNever show UI. Returns an error if the user isn't signed in (good for "am I signed in?" checks)

Examples

Userinfo

curl -H "Authorization: Bearer ACCESS_TOKEN" \
  https://accounts.webrizen.com/api/auth/oauth2/userinfo

Refresh

curl -u CLIENT_ID:CLIENT_SECRET https://accounts.webrizen.com/api/auth/oauth2/token \
  -d grant_type=refresh_token -d refresh_token=REFRESH_TOKEN

Introspection (from your backend)

curl -u CLIENT_ID:CLIENT_SECRET https://accounts.webrizen.com/api/auth/oauth2/introspect \
  -d token=ACCESS_TOKEN

App token (client credentials, for the Directory API)

curl -u CLIENT_ID:CLIENT_SECRET https://accounts.webrizen.com/api/auth/oauth2/token \
  -d grant_type=client_credentials -d scope=members:read

Global sign-out

https://accounts.webrizen.com/api/auth/oauth2/end-session
  ?client_id=CLIENT_ID
  &id_token_hint=ID_TOKEN
  &post_logout_redirect_uri=https://restaurant.webrizen.com
Note

post_logout_redirect_uri must be one of the app's registered sign-out redirect URIs.