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

Fixes TypeError in JWTManager #1067

Merged
merged 3 commits into from
Oct 17, 2022
Merged

Fixes TypeError in JWTManager #1067

merged 3 commits into from
Oct 17, 2022

Conversation

magikid
Copy link
Contributor

@magikid magikid commented Sep 6, 2022

When the TokenExtractor extracts a token, it will return
string|false. The JWTAuthenticator then passes this value to
JWTManager::doAuthenticate which can only accept a string. If a false
is returned by the TokenExtractor, PHP throws a type error. This commit
checks the return value and throws an exception if it returns false.

Issue: #1066

When the TokenExtractor extracts a token, it will return
`string|false`.  The JWTAuthenticator then passes this value to
`JWTManager::doAuthenticate` which can only accept a string.  If a false
is returned by the TokenExtractor, PHP throws a type error.  This commit
checks the return value and throws an exception if it returns false.

Issue: lexik#1066
@chalasr
Copy link
Collaborator

chalasr commented Oct 17, 2022

Thank you @magikid.

@chalasr chalasr merged commit e818985 into lexik:2.x Oct 17, 2022
@magikid magikid deleted the magikid-1066 branch October 17, 2022 16:37
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.

2 participants