feat(auth): add authorization_request_params to OpenID4VCI requestCredential API#4333
Open
reinkrul wants to merge 1 commit into
Open
feat(auth): add authorization_request_params to OpenID4VCI requestCredential API#4333reinkrul wants to merge 1 commit into
reinkrul wants to merge 1 commit into
Conversation
…dential API Lets callers add issuer-specific query parameters (e.g. auth_method=SmartCard for AET ZORG-ID smartcards) to the OpenID4VCI authorization request, mirroring the credential_request_params field for the Credential Request. Applied after the node's own parameters, so caller values win. Implements #4328. Assisted by AI
Contributor
1 new issue
|
Contributor
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (1)
🛟 Help
|
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.

Implements #4328.
What
Adds an optional
authorization_request_paramsfield to therequestCredentialAPI body. The node merges these key/value pairs into the OpenID4VCI authorization request (the redirect to the Authorization Server'sauthorization_endpoint), mirroring the existingcredential_request_paramsfield for the Credential Request.{ "issuer": "https://issuer.example.com/oauth", "wallet_did": "did:web:example.com", "authorization_details": [ { "type": "openid_credential", "credential_configuration_id": "..." } ], "redirect_uri": "https://example.com/oauth2/org1/callback", "authorization_request_params": { "auth_method": "SmartCard" } }→ redirect:
.../oauth/connect/authorize?...&auth_method=SmartCard.Why
The AET ZORG-ID issuer requires a non-standard
auth_method=SmartCardquery parameter on the authorization request to start smartcard login. The authorization request query was a fixed list with no caller hook (auth/api/iam/openid4vci.go). The standard mechanism (authorization_details, RFC 9396) is preferred and already sent, but AET does not accept the smartcard selection there.Behavior
credential_request_params).map[string]string) — URL query parameters.Changes
docs/_static/auth/v2.yaml— new request-body field; regeneratedauth/api/iam/generated.goande2e-tests/browser/client/iam/generated.goviamake gen-api.auth/api/iam/openid4vci.go— merge the params inRequestOpenid4VCICredentialIssuance.auth/api/iam/openid4vci_test.go— assert the param lands in the redirect query.Notes
Already running on
project-gf-pilot(where the field was first added asauthorization_params, then renamed here to align withcredential_request_params).🤖 Assisted by AI