Identity & access

Scopes and audiences

The closed list of audiences, which scopes each one grants, and how a client's resource allow-list constrains what it can ever mint.

An audience is a resource server; a scope is what you may do there. Each access token carries exactly one audience and only scopes belonging to it. Widening either means a new authorization — never a second call with the same token.

Scopes

openid
Who may request itAll clients
What it grantsRequired for the code flow; issues an ID token
email
Who may request itAll clients
What it grantsAdds email and email_verified
profile
Who may request itAll clients
What it grantsAdds the person's name
offline_access
Who may request itBrowser and native clients
What it grantsIssues a rotating refresh token
appcenter
Who may request itClients assigned appcenter
What it grantsUser-facing App Center API
retill
Who may request itClients assigned retill
What it grantsUser-facing Retill API
onekitchen
Who may request itClients assigned onekitchen
What it grantsUser-facing OneKitchen API
appcenter:service, retill:service, onekitchen:service
Who may request itService clients only
What it grantsServer-to-server routes. Never combined with openid.

Audiences

urn:versified:api:appcenter
Resource serverApp Center (admin and application APIs)
urn:versified:api:retill
Resource serverRetill
urn:versified:api:onekitchen
Resource serverOneKitchen

The list is closed. A request for any other resource fails with invalid_target, and the check runs on authorization, on code exchange and on refresh — so a client whose allow-list changed loses the audience at its next refresh rather than keeping a stale grant.

Resource indicators

RFC 8707
POST /oidc/token
grant_type=client_credentials
&client_id=ledgerly-backend
&client_secret=...
&scope=appcenter:service
&resource=urn:versified:api:appcenter

One token, one audience

If your backend talks to two Versified APIs, hold two clients or mint two tokens. Reusing one token across resources is refused by design.

Something here out of date or unclear?

The platform team answers integration questions directly.

support@versified.com.gh
32 pages in this documentation