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 ParsePublicURL #2560

Merged
merged 2 commits into from
Oct 25, 2023
Merged

Refactor ParsePublicURL #2560

merged 2 commits into from
Oct 25, 2023

Conversation

gerardsn
Copy link
Member

All URLs obtained from external sources (metadata endpoints) need to be validated for OAuth2/OpenID4VC meaning that all methods using these URLs will require the following codeblok:

if strictmode {
	issuerURL, err = core.ParsePublicURL(issuer, false, "https")
} else {
	issuerURL, err = core.ParsePublicURL(issuer, true, "https", "http")
}

This PR makes that a bit easier

Copy link
Member

@reinkrul reinkrul left a comment

Choose a reason for hiding this comment

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

Why "Public"?

@gerardsn gerardsn merged commit db42d97 into master Oct 25, 2023
6 checks passed
@gerardsn gerardsn deleted the refactor-ParsePublicURL branch October 25, 2023 13:08
@gerardsn
Copy link
Member Author

Because this is effectively a validation of the auth.publicUrl config value configured in the other nuts node. Maybe a bit redundant, but I like that it is specific.

woutslakhorst pushed a commit that referenced this pull request Oct 25, 2023
* refactor ParsePublicURL

* add tests
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.

3 participants