Closed gladtoeatu closed 19 hours ago
The changes introduce a new class, AccessTokenConstraint
, in the src/Jwt
directory, which implements a constraint for access tokens in the JWT handling process. Additionally, the AbstractJwt
class is modified to include a new private readonly property, accessTokenConstraint
, in its constructor. The parserRefreshToken
method is updated to utilize this new property when parsing refresh tokens, while the parserAccessToken
method remains unchanged in its parameters.
File Path | Change Summary |
---|---|
src/Jwt/AbstractJwt.php | Added private readonly property accessTokenConstraint to constructor. Updated parserRefreshToken to include accessTokenConstraint in the parse function call. |
src/Jwt/AccessTokenConstraint.php | Introduced new class AccessTokenConstraint implementing Constraint interface with method assert(Token $token) that checks if the token is related to 'refresh'. |
In the land of tokens, so bright and fair,
A new constraint hops in with flair.
Access tokens now have a friend,
Parsing refreshes, on it we depend.
With each new change, we grow and play,
Hopping through code, come what may! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
Summary by CodeRabbit
New Features
AccessTokenConstraint
class to enhance token validation.Bug Fixes