-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Create none signer #160
Create none signer #160
Conversation
@Ocramius I like the final result but still have mixed feelings regarding creating "useless" objects ( I can also convert the |
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.
I can also convert the
new Signature('', '')
to a named constructor. I don't think it makes sense to use inheritance there (to have a special case object)...
That's indeed something I'd suggest as well. Creating "useless" objects shouldn't be a problem, given that crypto performance is much more relevant than no-crypto-performance in this lib.
@@ -38,6 +38,7 @@ public function createDependencies(): void | |||
* | |||
* @uses \Lcobucci\JWT\Token\DataSet | |||
* @uses \Lcobucci\JWT\Token\Plain | |||
* @uses \Lcobucci\JWT\Token\Signature |
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.
Just noticed all these @uses
: since I didn't notice before, what is the conveyed intent?
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.
Although the objects are used I don't want to make PHPUnit mark them as covered on the coverage report.
@covers
and @uses
are a requirement since I configured PHPUnit to be strict about these annotations.
@Ocramius any suggestion regarding the method name? Not so creative right now 😜 btw I was also thinking about adding |
Start from a sentence explaining what you are doing when creating an empty signature.
Seems like a good idea, since you'd never want just one or two of the three. |
So we can have just one way of creating tokens.
Parser shouldn't change headers to ensure "consistency". The token should just be decoded based on the user input.
3de5877
to
85f5df1
Compare
Fixes #152