Skip to content

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented May 13, 2025

The grammar is pretty hellish and parsing a URL by using a regex is awful =(

https://www.cl.cam.ac.uk/~jac22/books/www/book/node166.html

@t3chguy t3chguy self-assigned this May 13, 2025
Copy link

cloudflare-workers-and-pages bot commented May 13, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6ecc150
Status: ✅  Deploy successful!
Preview URL: https://f91ee99b.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://t3chguy-patch-1.matrix-authentication-service-docs.pages.dev

View logs

@t3chguy t3chguy marked this pull request as ready for review May 13, 2025 10:46
Copy link
Contributor

@mcalinghee mcalinghee left a comment

Choose a reason for hiding this comment

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

In order to make it easier to understand on what the regex will parse, we can add a test in client_registration_test.rego

test_parse_uri if {
	client_uri_query := client_registration.parse_uri("https://example.com:8080/users?query=test")
	client_uri_query.authority == "example.com:8080"
	client_uri_query.host == "example.com"
	client_uri_query.path == "/users"
	client_uri_query.scheme == "https"
	client_uri_query.port == "8080"
	client_uri_query.query == "?query=test"
}

Copy link
Member

@sandhose sandhose left a comment

Choose a reason for hiding this comment

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

Tested locally and looks like it works well, thanks!

@sandhose sandhose merged commit d8fa8f7 into main May 30, 2025
20 checks passed
@sandhose sandhose deleted the t3chguy-patch-1 branch May 30, 2025 15:40
@sandhose sandhose added T-Defect Something isn't working A-Next-Gen-Auth Related to the next generation authentication APIs A-Spec-Compliance Divergence from the Matrix or the OAuth 2.0/OIDC specifications labels Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Next-Gen-Auth Related to the next generation authentication APIs A-Spec-Compliance Divergence from the Matrix or the OAuth 2.0/OIDC specifications T-Defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants