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

feat: support configurable token endpoint #137

Merged
merged 11 commits into from
Nov 4, 2024

Conversation

Divan009
Copy link
Contributor

@Divan009 Divan009 commented Oct 1, 2024

This pull request introduces the _parse_issuer function, enhancing the validation and normalization of issuer URLs for OAuth token requests. It ensures URLs adhere to standards by verifying schemes and appending a default path if needed.

Description

This pull request introduces a new function, _parse_issuer, to the authentication system, specifically designed to enhance the validation and normalization of issuer URLs used in OAuth token requests.

This function systematically checks and corrects the structure of the issuer URL, ensuring it adheres to expected standards, such as including a valid scheme (http or https) and appending a default endpoint path if none is provided.

Additionally, comprehensive tests have been added to validate the functionality of this new method against various edge cases and common URL formatting errors.

Changes

  • Added _parse_issuer function to enhance issuer URL validation in Credentials.
  • Implemented unit tests for _parse_issuer to ensure robust handling of a variety of URL inputs.

References

This PR closes issue #136.

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@Divan009 Divan009 requested a review from a team as a code owner October 1, 2024 16:12
Copy link

linux-foundation-easycla bot commented Oct 1, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@Divan009
Copy link
Contributor Author

Divan009 commented Oct 1, 2024

I just saw PR are no longer being accepted here. So closing this

rhamzeh
rhamzeh previously approved these changes Oct 21, 2024
@evansims evansims added this pull request to the merge queue Nov 4, 2024
Merged via the queue into openfga:main with commit 9304bca Nov 4, 2024
10 checks passed
@evansims evansims changed the title feat/(token): token endpoint is now configurable feat: support configurable token endpoint Nov 4, 2024
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