-
Notifications
You must be signed in to change notification settings - Fork 3
fix: update OAuth Authorization Server Metadata endpoint construction #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the OAuth Authorization Server URL construction to comply with RFC8414 and updates proof signing algorithm handling to use strings instead of Algorithm enum types.
- Corrects the OAuth Authorization Server Metadata endpoint URL construction according to RFC8414 specification
- Changes proof signing algorithm values from enum types to strings for better API compatibility
- Updates related test code to use string-based algorithm identifiers
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| oid4vci/src/wallet/mod.rs | Implements RFC8414-compliant URL construction and updates algorithm handling logic |
| oid4vci/src/proof.rs | Changes KeyProofMetadata to use Vec for algorithm values |
| oid4vci/src/credential_issuer/credential_issuer_metadata.rs | Updates test to use string algorithm identifiers |
| oid4vci/src/credential_issuer/credential_configurations_supported.rs | Updates tests to use string algorithm identifiers and removes unused import |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
… to comply with RFC8414
0a004d3 to
c592d7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…cording to RFC 8414
Description of change
This change corrects the logic in the
get_authorization_server_metadatafunction to properly construct the metadata URL as specified in RFC 8414.Previously, the well-known path was appended to the issuer's path. The logic is now fixed to place the issuer's path components after the
/.well-known/oauth-authorization-serversegment.Example:
Before:
https://example.com/issuer->https://example.com/issuer/.well-known/oauth-authorization-serverAfter:
https://example.com/issuer->https://example.com/.well-known/oauth-authorization-server/issuerFurthermore, in line with RFC 8414 Section 5, a fallback to the
/.well-known/openid-configurationendpoint is added that will be used when the/.well-known/oauth-authorization-serverdoes not exist.Finally, the amount of retries is reduced from 5 to 2 in order to reduce some significant unnecessary user-facing delay (this decreases max duration from 31 secs to 3 secs).
Links to any relevant issues
https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-15.html#section-11.2.3-2.2
https://www.rfc-editor.org/rfc/rfc8414.html#section-3
https://www.rfc-editor.org/rfc/rfc8414.html#section-5
How the change has been tested
Existing test has been updated
Definition of Done checklist
Add an
xto the boxes that are relevant to your changes.