Endpoints#
Every endpoint the package publishes, by layer.
Important
Every REST service is registered with zope2.View, and authorization happens
inside the service class. Reading the registration alone understates what a
caller needs. The "Requires" column below is what the code actually enforces.
Core layer#
Present in every installation.
Method |
Path |
Requires |
Purpose |
|---|---|---|---|
GET |
|
anonymous |
Providers to offer on the login page. Enabled and shown only. Also available as a |
POST |
|
anonymous |
The provider redirects here; completes a sign-in. |
POST |
|
anonymous |
Send a single-use sign-in link. Answers identically whether or not the address is known. |
POST |
|
anonymous |
Redeem a link. Burns the token. |
GET |
|
authenticated |
The caller's own profile. |
GET |
|
authenticated |
The caller's own sign-in methods. |
POST |
|
authenticated |
Link a new sign-in method. |
DELETE |
|
authenticated |
Unlink one. Refused for the last remaining method. |
GET |
|
authenticated |
The profile content types. |
PATCH |
|
see source |
Update profile fields. |
GET |
|
see source |
A profile portrait. |
GET |
|
|
Members of a group. |
GET |
|
|
One user's sign-in methods, for administrators. |
GET |
|
|
Drivers available to configure. |
GET |
|
|
Configured providers, or one with |
POST |
|
|
Add a provider. |
POST |
|
|
Fetch the provider's discovery document, cache cleared first, and report what came back. |
PATCH |
|
|
Change one. |
DELETE |
|
|
Remove one. Linked identities are kept. |
GET |
|
|
Authentication events. |
@group-members is the one with a compound rule: Manage users, or
membership of the group being asked about.
Three answers worth knowing#
Endpoint |
Answers |
|---|---|
|
Where the caller's |
|
The people in one group, named rather than only listed as userids, plus the nesting around it and a search within it. |
|
Which providers a person has configured—named, dated, and flagged when the provider has since been disabled or removed—and when they last authenticated. One user at a time: the audit log is bounded per user, so folding this into the |
@user-account allows a caller asking about themselves without Manage users.
Server layer#
Published only where the pas.plugins.identity.server:default profile has been
applied. These are bound to IIdentityServerLayer, so a site without that
profile does not publish them at all.
Method |
Path |
Requires |
Purpose |
|---|---|---|---|
GET |
|
|
Registered OAuth clients, or one with |
POST |
|
|
Register one. The secret is in this response and nowhere else. |
POST |
|
|
Mint a fresh secret. Same warning applies. |
PATCH |
|
|
Change title, redirect URIs, grants, scope, service user, and enabled. |
DELETE |
|
|
Remove one. |
GET |
|
|
Describe the signing ring. |
POST |
|
|
Rotate the signing key. Older keys stay in the ring so tokens already issued keep verifying. |
GET |
|
authenticated |
What a client is asking for, for the consent screen. |
GET |
|
authenticated |
Applications the caller has granted access to. |
DELETE |
|
authenticated |
Withdraw one. |
Browser views#
Path |
Layer |
Purpose |
|---|---|---|
|
core |
The control panel view. |
|
core |
Receives a logout token from a provider. See How to enable back-channel logout. |
|
server |
The authorization endpoint. Public: the browser reaching it may be anonymous, and the view refuses an unauthenticated end user itself with the error code the specification names. |
|
server |
The token endpoint. Public: the caller is a server holding client credentials, authenticated inside against the client registry. |
|
server |
The signing keys, as JWKS. |
|
server |
The userinfo endpoint. |
|
server |
The discovery document. |
Back-channel logout#
POST @@backchannel-logout
One endpoint serves every configured provider. The logout token names its issuer, and that is how the package chooses the provider, and therefore the key to verify the signature with.
The endpoint follows OpenID Connect Back-Channel Logout 1.0. A token must satisfy all of the following:
Check |
Refused when |
|---|---|
Signature |
Not valid against the issuer's published key. |
Issuer and audience |
Either does not match. |
|
Outside the acceptable window. |
|
Already acted on. A repeat is a replay. |
Event |
No back-channel logout event declared. |
Subject |
Neither a |
|
Present. A nonce means somebody is passing an |
Note
Only sub-based logout is supported. This package does not track provider
session identifiers, so a token carrying only a sid is refused.
A logout for an identity this site has never seen answers 200, not an error.
There is nothing to end, and answering differently would tell an unauthenticated
caller which of a provider's subjects have accounts here.
To enable it, see How to enable back-channel logout.
Why .well-known is registered oddly#
The path segment contains a dot, which a Zope view name cannot carry through
traversal in the usual way. So .well-known is registered as the view, and
the document name is traversed into it. A bare /.well-known/ is refused.
The published path is what a client expects:
https://id.example.com/.well-known/openid-configuration
The consent screen is the only page template#
server/browser/templates/consent.pt is the only page template in the package.
It is server-rendered, so a site running the server layer can be an identity
provider regardless of which frontend it runs itself.
Everything else a person sees is in the Volto add-on—see Frontend.