Reading provider metadata
The photo service's configuration document lists its endpoints, its keys and what it can do for clients that ask. This lesson reads it entry by entry from the collage app's side, and then looks at how a relying partyAn application that accepts and relies on a sign-in from another service, the name used in OpenID Connect and for passkeys. SAML calls the same role a service provider. uses a refreshed copy without letting it weaken any check.
Endpoints and keys
The collage app's developer now has the photo service's configuration document open in full. Some of it repeats what the photo service already publishes for OAuthA framework that lets a person give an application limited access to their resources at another service, using tokens instead of sharing their password. OAuth is about access; OpenID Connect adds sign-in. clients. The rest exists because the photo service is also an OpenID ProviderA service that authenticates users and tells other applications about the sign-in, so those applications never handle the users' passwords. In OpenID Connect it is called an OpenID Provider., and those are the entries a relying party reads most closely.
A few entries are left out here, including the grant types and the endpoints for pushed requests and revocationCancelling a credential, token, certificate, or authenticator before it would expire, so that it is no longer accepted. Whether every copy stops working at once depends on how services check it. that the full document also lists:
{
"issuer": "https://auth.photos.example",
"authorization_endpoint": "https://auth.photos.example/authorize",
"token_endpoint": "https://auth.photos.example/token",
"userinfo_endpoint": "https://auth.photos.example/userinfo",
"jwks_uri": "https://auth.photos.example/jwks",
"end_session_endpoint": "https://auth.photos.example/logout",
"scopes_supported": ["openid", "profile", "email", "offline_access",
"photos.read", "photos.write", "photos.delete"],
"response_types_supported": ["code"],
"subject_types_supported": ["public", "pairwise"],
"id_token_signing_alg_values_supported": ["RS256", "ES256"],
"claims_supported": ["sub", "name", "given_name", "family_name", "email",
"email_verified", "picture", "locale", "updated_at"],
"claims_parameter_supported": true,
"code_challenge_methods_supported": ["S256"],
"authorization_response_iss_parameter_supported": true
}Six entries are URLs. OpenID Connect DiscoveryA JSON document that an OpenID Provider publishes at a well-known address under its issuer, listing its endpoints, where to find its signing keys, and its supported features so clients can configure themselves from one value. requires some of them and leaves others to the provider:
| Entry | Status | What the collage app uses it for |
|---|---|---|
issuer | Required | The exact name compared in this document and in every ID token. |
authorization_endpoint | Required | Where Ava's browser goes with the authentication request. |
token_endpoint | Required, except at a provider that offers only the implicit flow | Where the collage app exchanges the code for an ID token. |
jwks_uri | Required | The key set used to check ID token signatures. |
userinfo_endpoint | Recommended | An endpoint that answers an access token with claims about its user, which The UserInfo endpoint covers. |
end_session_endpoint | Defined by RP-Initiated Logout, for providers that support it | Where the collage app can send Ava's browser to end her session at the photo service, which RP-initiated logout covers. |
OAuth has the same kind of document for authorizationDeciding whether a requested action is permitted, such as whether a signed-in account may delete a particular photo. Authentication says which account is asking; authorization decides what it can do. servers that don't sign anyone in, called authorization serverIn OAuth, the service that handles a person's sign-in and approval and decides which tokens to issue to a client. It may belong to the same company as the API, but its job is separate. metadata. There, only the issuerThe party that creates and signs a token, assertion, or certificate, named in a token's iss claim. A recipient must check that the issuer is exactly the one it expected and trusts. and the response types are always required. Any relying party may need to check an ID tokenIn OpenID Connect, a signed JWT from the provider, addressed to one client, saying which account authenticated, when, and in answer to which request. It reports a sign-in and is not used to call APIs.'s signatureA value made with a private key that lets anyone holding the matching public key check that a message came from the key's holder and has not been changed. It proves origin and integrity; it does not hide the message., so OpenID ConnectAn identity layer on top of OAuth 2.0 that lets an application sign people in with an account at another service. It adds the ID token, standard claims, and discovery to the OAuth exchange. also requires jwks_uri, and it adds two required capability lists of its own, for subject types and ID tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. signing algorithms.
Every address must use HTTPS, and the collage app uses each one exactly as written. Nothing requires the endpoints to share the issuer's host, and some providers serve their key set or token endpoint from a different one, so the collage app takes every address from the document rather than assembling it from the issuer.
The key set at jwks_uri holds more than the collage app needs. It contains the RSA key photos-rs-2026-09, which signs ID tokens with RS256, and the EC key photos-2026-09, which signs the photo service's JWT access tokens with ES256. The collage app picks the key named by an ID token's kid and uses it only with the algorithm it accepts for ID tokens, as Signing keys and rotation explained. The set contains public keys only. Discovery forbids private and symmetric keys in it.
Advertised capabilities
The entries ending in _supported describe what the provider can do. Read with sign-in in mind, they say:
scopes_supportednamesopenid, which every OpenID Provider must support. Here it also listsprofileandemail, which ask for groups of claims, andoffline_access, which asks for a refresh token. A provider may leave some scopes out of the list, so a missing scope is a question for its documentation rather than proof that the scope does not exist.response_types_supportedis required, and the photo service lists onlycode. Its ID tokens always come from the token endpoint. Values such asid_tokenorcode id_tokenwould mean ID tokens delivered through the browser, an older style of integration that Response types, response modes, and older flows describes.subject_types_supportedis required. Apublicsubject is the samesubfor every client; apairwisesubject is a different one for each client, so two applications can't match up their users by comparingsubvalues. The photo service can do either. Public and pairwise subject identifiers compares the two in depth.id_token_signing_alg_values_supportedis required and must include RS256, the default every relying party can count on. The photo service can also sign ID tokens with ES256 for clients that ask for it.claims_supportedlists claims the provider may be able to supply. It is not a promise to release any of them to a particular client, and it may not be complete.claims_parameter_supportedsays the provider accepts theclaimsrequest parameter, which lets a client ask for individual claims by name rather than for a scope's whole group. Scopes and the claims parameter shows how.
The last two entries come from OAuth specifications that OpenID Providers use as well. code_challenge_methods_supported tells the collage app that PKCE with S256 works here. authorization_response_iss_parameter_supported promises that every authorization response, including a sign-in callback, carries iss, the check against mixed-up providers from Correlating requests and responses.
Missing entries have meanings of their own. A list with no values is left out rather than sent empty, a missing true-or-false entry such as claims_parameter_supported means false, and a few lists have defaults. Missing grant types, for example, default to the authorization code and implicit grants, which is one reason the photo service's full document lists its grants rather than leaving them out.
None of these lists describe the collage app. They describe what the photo service can do for clients that ask. ES256 appears among the ID token algorithms, but the collage app's registration uses RS256, so an ID token for photo-collage signed with ES256 is rejected even though the provider supports it. Pairwise subjects appear too, but the collage app's registration asks for public ones, so its sub for Ava is user-2048. The registration, not the metadata, decides which of the provider's options apply to a client, and Registering a relying party looks at those choices.
The document is also public. Anyone can fetch it, including someone looking for an endpoint to probe. That is not a reason to hide it: everything in it is information the provider's documentation would publish anyway, and the provider's defenses have to hold whether or not an attacker has read the list.
Using metadata safely
Metadata makes the collage app's configuration shorter. It should not make the collage app's rules weaker, and three habits keep it that way.
First, the document never widens what the collage app accepts. Suppose a refreshed copy listed none or HS256 among the ID token algorithms. Nothing would change for the collage app, whose allowlist comes from its registration. A library that chose the algorithm by reading the provider's list, or accepted anything on it, would let one line in a document undo a check from Validating an ID token.
Second, a missing entry does not switch off a protection the collage app relies on. If the photo service's document stopped listing code_challenge_methods_supported, OAuth's metadata rules would read that as no PKCE support. A relying party that responded by quietly dropping PKCE would sign people in with less protection from that moment on, because of one missing line. The collage app keeps its own expectations instead. It goes on sending PKCE, as it would go on requiring iss if that promise vanished too, and it raises the change with its operators.
Third, a refreshed copy is compared with the last one, not simply absorbed. Most refreshes change nothing. The photo service's key rotations happen inside the key set, at the same jwks_uri, rather than in this document. A copy that names a different issuer is not a change at all: it fails the checks in Provider discovery and is discarded. A few changes deserve a person's attention even when the document passes, such as a different jwks_uri or token endpoint, especially on a new host, or a security feature that disappears.
Changes that make the collage app stricter, such as a provider beginning to promise iss, are safe to adopt. Changes that would make it looser wait for someone to decide, and until someone does, the collage app keeps using its last accepted copy.
What the refresh brings
- Algorithms
- none or HS256 added
- PKCE
- code_challenge_methods_supported missing
- Key set
- jwks_uri on a new host
- iss
- Begins to promise iss
- Issuer
- A different issuer
What the collage app does
- Nothing changes: its allowlist comes from its registration
- Goes on sending PKCE and raises the change with its operators
- Waits for someone to decide
- Safe to adopt
- Discarded: it fails the checks in Provider discovery
Only stricter changes are adopted on their own
Until someone decides, the collage app keeps using its last accepted copy.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Change tenant settings, watch the metadata follow, and guard your refreshesRead your tenant's discovery document entry by entry, change a grant, a claim and a key set path to see the document move, then build a refresh guard that refuses to loosen your relying party.