Fix OIDC discovery document accuracy#70
Merged
Merged
Conversation
The discovery document had two inaccuracies: 1. claims_supported listed "name" which is never returned by any endpoint. Replaced with the claims actually returned by the UserInfo and ID token endpoints: preferred_username, given_name, family_name, picture, at_hash. 2. registration_endpoint pointed to /oauth/register (user self-signup), not RFC 7591 Dynamic Client Registration. OIDC client libraries that support dynamic registration would POST a client registration request to this endpoint and get back an HTML form. Removed the field. Closes #56, closes #57. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two inaccuracies in the OIDC discovery document (
/.well-known/openid-configuration) that could cause issues for OIDC client libraries:claims_supportedlisted"name"which is never returned by any endpoint. Replaced with the claims actually served by UserInfo and ID tokens:preferred_username,given_name,family_name,picture,at_hash. This matters because OIDC clients use this field to decide which claims to request — listing a nonexistent claim while omitting real ones is actively misleading.registration_endpointpointed to/oauth/register, which is the user self-signup HTML page — not RFC 7591 Dynamic Client Registration. An OIDC client library that supports dynamic registration would POST a JSON client registration request to this URL and get back an HTML form instead of a JSON response. Removed the field entirely since dynamic client registration is not implemented.Test plan
TestOIDCDiscoveryEndpointvalidating the correctedclaims_supportedvalues and the absence ofregistration_endpointgo test ./pkg/httpserver/ -run TestOAuthFlowSuite/TestOIDCDiscoveryEndpointCloses #56, closes #57.
🤖 Generated with Claude Code