Skip to content
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

Refactor and merge Callbacks #3151

Merged
merged 3 commits into from
May 31, 2024
Merged

Refactor and merge Callbacks #3151

merged 3 commits into from
May 31, 2024

Conversation

gerardsn
Copy link
Member

@gerardsn gerardsn commented May 28, 2024

cleanup and merge callbacks. This contains some fixes listed in #3152, but the majority is left for when we have access to a compliant issuer so we can do an end to end test of the flow.

@gerardsn gerardsn marked this pull request as ready for review May 29, 2024 12:10
Comment on lines 218 to 220
if request.Params.State == nil || *request.Params.State == "" {
return nil, oauthError(oauth.InvalidRequest, "missing state parameter")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the Callback has an error but is missing the client state, the actual error will not be shown

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC6749 4.1.2.1. Error Response

state
REQUIRED if a "state" parameter was present in the client
authorization request. The exact value received from the
client.

I wasn't sure what to do with this, but I will wrap the error if there is one

auth/api/iam/api.go Outdated Show resolved Hide resolved
auth/api/iam/openid4vci.go Outdated Show resolved Hide resolved
@@ -472,64 +472,6 @@ paths:
"$ref": "#/components/schemas/VerifiableCredential"
default:
$ref: '../common/error_response.yaml'
/iam/oid4vci/callback:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add to calback API description that it's used for both calls.

@gerardsn gerardsn requested a review from woutslakhorst May 31, 2024 08:27
@gerardsn gerardsn merged commit 219beee into master May 31, 2024
8 of 9 checks passed
@gerardsn gerardsn deleted the merge-callback-endpoints branch May 31, 2024 17:13
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