-
Notifications
You must be signed in to change notification settings - Fork 106
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
Added exception if secret key or private and public key is missing #123
Added exception if secret key or private and public key is missing #123
Conversation
@eschricker can we merge it? |
From my side it is fine. @mfn would you like to have a look at the changes? |
Will review soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late to the party 😅
LGTM, just one minor suggestion.
if(is_null($secret) && (is_null($keys['public']) || is_null($keys['private']))) { | ||
throw new SecretMissingException(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only improvement I an think would be to include a nice message, pointing out which secret is missing specifically.
This seems like a breaking change for an app that uses this package only for authenticating users.
|
If the secret key (symmetric algo) or private and public key (asymmetric algo) are missing, you will get a type mismatch error from Lcobucci (see #116).
Description
An own exception has been added which will be thrown, when the either the secret key or private/public key are missing. In that case you will get a better error message.
Fixes #116
Checklist:
CHANGELOG.md