Skip to content
DevelopMarkdown

Apps and agents

The OAuth 2.0 and OpenID Connect endpoints your apps, services and agents call on your realm's host, and the documents they discover them from.

AvailableAPIRFC 6749, OpenID Connect Core 1.0, RFC 8414

Your apps, services and AI agents don’t use an administrator’s session. They call your realm as an OAuth 2.0 authorization server and an OpenID Connect provider, with credentials of their own, in the standard form any OAuth library speaks. Point the library at your realm’s issuer and it finds everything else.

The issuer is your realm’s host followed by /oauth2:

https://foobar.cvyuh.com/oauth2

A client reads the realm’s metadata once and takes every endpoint, signing algorithm and supported grant from it:

Terminal window
curl https://foobar.cvyuh.com/oauth2/.well-known/openid-configuration

Your realm publishes these documents under /.well-known/, each readable by anyone, with no credential:

DocumentAddressWhat it gives
OpenID Connect discoveryhttps://foobar.cvyuh.com/oauth2/.well-known/openid-configurationThe provider’s metadata, while the realm offers openid
OAuth 2.0 authorization server metadata (RFC 8414)https://foobar.cvyuh.com/.well-known/oauth-authorization-server/oauth2The same metadata, for OAuth clients that don’t use OpenID Connect
Shared Signals transmitter (OpenID SSF 1.0)https://foobar.cvyuh.com/.well-known/ssf-configuration/oauth2Where a receiver manages its stream of security events, while the realm transmits them
Policy decisions (OpenID AuthZEN 1.0)https://foobar.cvyuh.com/.well-known/authzen-configurationThe decision and search endpoints an enforcement point calls

A document for something the realm doesn’t offer answers 404. See Check what clients discover for what a developer needs from them.

Every endpoint sits beneath the issuer. The metadata names them; this table is what each one is for.

MethodEndpointWhat it doesPage
GET, POSThttps://foobar.cvyuh.com/oauth2/authorizeSigns the user in in the browser and returns a code to the appAuthorization code with PKCE
POSThttps://foobar.cvyuh.com/oauth2/parTakes a sign-in request before the browser goes to authorizePushed authorization requests
POSThttps://foobar.cvyuh.com/oauth2/tokenIssues tokens, for every grant the realm allowsAccess tokens
POSThttps://foobar.cvyuh.com/oauth2/authorize-challengeSigns a user in from your own native app’s screensFirst-party app sign-in
POSThttps://foobar.cvyuh.com/oauth2/device_authorizationStarts a sign-in for a device with no usable browserDevice authorization
GET, POSThttps://foobar.cvyuh.com/oauth2/deviceThe page where the user enters the device’s codeDevice authorization
POSThttps://foobar.cvyuh.com/oauth2/bc-authorizeAsks a user to approve on their own device, for an app or agent that isn’t in front of themBackchannel authentication
GET, POSThttps://foobar.cvyuh.com/oauth2/userinfoThe signed-in user’s claimsOpenID Connect sign-in
POSThttps://foobar.cvyuh.com/oauth2/introspectWhether a token is active, and what it carriesIntrospection
POSThttps://foobar.cvyuh.com/oauth2/revokeWithdraws a tokenRevoke tokens
GEThttps://foobar.cvyuh.com/oauth2/status/{list}A token status list, for checking tokens offlineStatus lists
GEThttps://foobar.cvyuh.com/oauth2/jwksThe public keys the realm signs tokens withSigning keys
POSThttps://foobar.cvyuh.com/oauth2/registerRegisters a client, with a registration token an administrator issuedDynamic registration
GET, POSThttps://foobar.cvyuh.com/oauth2/logoutSigns the user out of the realm and returns to the appLogout
GET, POSThttps://foobar.cvyuh.com/oauth2/consentThe page where the user allows an app what it asked forConsent
POST, GET, DELETEhttps://foobar.cvyuh.com/oauth2/ssf/streamA receiver’s stream of security events; with ssf/status, ssf/subjects/add, ssf/subjects/remove and ssf/verify beside itSend signals

A service with no user involved asks for a token with its own credentials:

Terminal window
curl -X POST https://foobar.cvyuh.com/oauth2/token \
-u "<client id>:<client secret>" \
-d grant_type=client_credentials \
-d scope=<scope>
{ "access_token": "<token>", "token_type": "Bearer", "expires_in": 300, "scope": "<scope>" }

The realm’s other grants go to the same endpoint:

Grantgrant_typeFor
Authorization codeauthorization_codeAn app signing a user in in the browser
Refresh tokenrefresh_tokenKeeping an app signed in
Client credentialsclient_credentialsA service calling another, with no user
Token exchange (RFC 8693)urn:ietf:params:oauth:grant-type:token-exchangeAn agent acting for a user, or a token swapped for another API
Device code (RFC 8628)urn:ietf:params:oauth:grant-type:device_codeA TV or command-line tool
Backchannel authentication (CIBA)urn:openid:params:grant-type:cibaAn approval asked of the user on their own device
JWT bearer (RFC 7523)urn:ietf:params:oauth:grant-type:jwt-bearerA trusted partner’s statement about a user, turned into a token
Deferredurn:ietf:params:oauth:grant-type:deferredCollecting a token the realm held back for an owner’s approval

A realm allows a grant only where its settings and the client’s registration both list it.

An enforcement point, such as the gateway in front of your API, calls the realm with a token of its own, carrying the scope each call needs:

MethodEndpointWhat it does
POSThttps://foobar.cvyuh.com/access/v1/evaluationOne decision: may this subject do this action on this resource
POSThttps://foobar.cvyuh.com/access/v1/evaluationsSeveral decisions in one call
POSThttps://foobar.cvyuh.com/access/v1/search/subjectWho may do an action on a resource
POSThttps://foobar.cvyuh.com/access/v1/search/actionWhat a subject may do on a resource
GEThttps://foobar.cvyuh.com/policies/v1/exportThe realm’s policies, to decide locally
GEThttps://foobar.cvyuh.com/policies/v1/revocationsWhat has been withdrawn since, for a gateway deciding locally

See Ask the realm and Decide locally.