-
Notifications
You must be signed in to change notification settings - Fork 2
Handle packed params #32
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
Conversation
judithroth
left a comment
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.
So far this looks good to me! I also tried it locally and it works.
src/extensions/openProjectApi.ts
Outdated
| readonly, | ||
| } = verifyToken(token); | ||
|
|
||
| console.log({ token, resourceUrl, tokenResourceUrl, authToken, readonly }); |
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.
You're probably aware that this is still here and remove it before merge 🙂
judithroth
left a comment
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.
As said when we discussed, I would have preferred an different approach. But as this seems not to be easily doable with Hocuspocus, I'm ok with the current approach.
I tested both PRs locally and it works 👍
Good work!
| }); | ||
|
|
||
| test("when the token is invalid throw an error", async () => { | ||
| test("when the packedParams is expired", async () => { |
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.
Thanks for adding tests!
|
Close in favour of #33 |
Counterpart of opf/openproject#21706
What are you trying to accomplish?
Package parameters from rails counterpart so that we can properly validate them in Hocuspocus
What approach did you choose and why?
The parameters are packaged into a JWT using symmetric signatures to allow validation.
Merge checklist