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

[13.x] Rename CheckClientCredentials middleware #1792

Open
wants to merge 6 commits into
base: 13.x
Choose a base branch
from

Conversation

hafezdivandari
Copy link
Contributor

@hafezdivandari hafezdivandari commented Oct 4, 2024

This PR corrects the naming of the CheckClientCredentials and CheckClientCredentialsForAnyScope middlewares. As mentioned in this comment and this issue, the current naming is confusing and does not accurately reflect the functionality of these middlewares:

  • The CheckClientCredentials class has been renamed to CheckToken, as it does not check client credentials but instead verifies whether the token is valid and has all the specified scopes.
  • The CheckClientCredentialsForAnyScope class has been renamed to CheckTokenForAnyScope, as it does not check client credentials but verifies whether the token has any of the specified scopes.
  • The CheckCredentials abstract class has been renamed to ValidateToken, as it does not check credentials but rather parses and validates the bearer token.

Summary

  • CheckClientCredentials -> CheckToken
  • CheckClientCredentialsForAnyScope -> CheckTokenForAnyScope
  • CheckCredentials -> ValidateToken

Usage

Refer to the updated docs:

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.

1 participant