Closed hafezdivandari closed 1 month ago
Isn't the token the client's credentials?
@taylorotwell No, it works with any token, and that's exactly what makes its naming confusing.
@hafezdivandari it's probably about time we think about releasing 13.x? Is there much more to do?
@taylorotwell there are 5 PRs in draft, the most important one is #1750 and #1762, we are waiting for @Sephster to merge the related bug fixes on oauth2-server
package before Passport 13.x release.
This PR corrects the naming of the
CheckClientCredentials
andCheckClientCredentialsForAnyScope
middlewares. As mentioned in this comment and this issue, the current naming is confusing and does not accurately reflect the functionality of these middlewares:CheckClientCredentials
class has been renamed toCheckToken
, as it does not check client credentials but instead verifies whether the token is valid and has all the specified scopes.CheckClientCredentialsForAnyScope
class has been renamed toCheckTokenForAnyScope
, as it does not check client credentials but verifies whether the token has any of the specified scopes.CheckCredentials
abstract class has been renamed toValidateToken
, 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: