Skip to content

Conversation

@berkes
Copy link

@berkes berkes commented May 14, 2025

The spec does not require the Pushed Authorization Request (PAR) endpoint to be in the authorization server (AS) metadata, yet the wwwallet crashes if this pushed_authorzation_server_endpoint isn't there.

This change makes it optional. It then initiates either a "normal" oidc flow, if the AS doesn't support the PAR. But intitiates a PAR if the server requires it.

This partly fixes issue #598 .

It complements the PR in wwWallet/wallet-common#3

Inside "our own fork" in wip/verify, we have applied a version on some of the older code that we use in our env, this was merged in #639 - the code was manually ported from the version at main to our version so the patches are different.


Some notes on the code quality:

  • I chose to duplicate a lot of code from OpenID4VCIPushedAuthorizationRequest in a new OpenID4VCIAuthorizationRequest. This could be DRYd. I chose not to, to keep the intention of this change clear and focused. Please let me know if you want me to DRY up the similarities and shared logic from these two services. And if so, if you want this in this PR, or in a different PR.

  • I chose to only use the PAR if it is required - not if it is optional. That makes the "common" authorization request - redirect/GET the common flow, but allows PAR if the AS requires this. Please let me know if you want a different business logic for this.

  • I chose to follow the AS metadata to determine this logic, and not some configuration option. It could be a configuration, but that would mean configuration and server-metadata must be matched and the combination validated runtime - ie. if the config option requires PAR, but the AS doesn't have PAR, this creates a complex validation issue. I opted for the simple version where the AS dictates what we can and should use in interacting with the AS.

The spec does not require the Pushed Authorization Request (PAR)
endpoint to be in the authorization server (AS) metadata, yet the
wwwallet crashes if this pushed_authorzation_server_endpoint isn't
there.

This change makes it optional. It then initiates either a "normal" oidc
flow, if the AS doesn't support the PAR. But intitiates a PAR if the
server requires it.

This fixes issue wwWallet#598.
@berkes berkes requested a review from a team as a code owner May 14, 2025 08:51
@nvoutsin
Copy link
Contributor

Closing this PR as per the reasoning in issue #598

@nvoutsin nvoutsin closed this Sep 17, 2025
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.

2 participants