Skip to content

Stop raising exceptions for optional discovery fields - #983

Open
w-goog wants to merge 3 commits into
masterfrom
codegen/rfc8414-optional-metadata-a
Open

w-goog wants to merge 3 commits into
masterfrom
codegen/rfc8414-optional-metadata-a

Conversation

@w-goog

@w-goog w-goog commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

This PR is the first half of fixing #380.

  • OIDServiceDiscovery now validates every URL-valued field that's present, not just the three required ones.
  • A JSON null or a non-string value fails with OIDErrorCodeInvalidDiscoveryDocument instead of raising an exception.
  • Yay for re-enabling the two pendingTest... cases!! plus one for the non-string case.

RFC 8414 documents that omit jwks_uri & co. still fail validation. The right fix is to mark those properties nullable, but that'd be source-breaking, so we'll do that in the 4.0 release.

@w-goog
w-goog force-pushed the codegen/rfc8414-optional-metadata-a branch from 64bc32c to c1f51bd Compare October 21, 2026 22:03
@w-goog w-goog changed the title [Draft] Stop raising exceptions for optional discovery fields Stop raising exceptions for optional discovery fields Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant