feat(client): path wildcard for redirect_uris #51
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.
Fix #49 . OAuth clients can now use
**wildcard inredirect_urisfor unlimited-length URL path segments (e.g.,https://example.com/property/**), while the existing*wildcard continues to work for DNS subdomains with 3-63 character limit. This is fully backwards compatible and requires no migration.I haven’t been able to properly run all tests/ Elixir formatter/ Credo, because I don’t have Elixir 1.11 installed and it was causing far too many changes with 1.19. I’ll see if my changes pass CI and, if not, I’ll stop being lazy and reinstall ASDF with Elixir 1.11.
What has changed?
lib/boruta/oauth/schemas/client.ex: addedreplace_wildcards/1private function to support both*(DNS-safe, 3-63 chars) and**(RFC 3986 path segments, unlimited length) wildcard patterns in redirect URI matching.How is this tested?
test/boruta/oauth/schemas/client_test.exs: added comprehensive unit tests covering single wildcard (*), double wildcard (**), mixed patterns, and some edge cases.test/boruta/oauth/integration/authorization_code_grant_test.exs&test/boruta/oauth/integration/implicit_grant_test.exs&test/boruta/oauth/integration/hybrid_test.exs: added integration tests with**wildcard for long path slugs (80+ characters).