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

refactor authentication key extraction #2253

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

MarinPostma
Copy link
Contributor

I am concerned that the part of the code that performs the key prefix extraction from the jwt token migh be misused in the future. Since this is a critical part of the code, I moved it into it's own function. Since we deserialized the payload twice anyway, I reordered the verifications, and we now use the data from the validated token.

@MarinPostma MarinPostma force-pushed the refactor-authentication-key-extraction branch from af49e79 to 6a82a05 Compare March 21, 2022 10:19
@MarinPostma
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Mar 21, 2022
@bors
Copy link
Contributor

bors bot commented Mar 21, 2022

try

Build failed:

Copy link
Member

@ManyTheFish ManyTheFish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's way clearer, thanks @MarinPostma!

@MarinPostma
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 22, 2022

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@MarinPostma MarinPostma added this to the v0.27.0 milestone Mar 22, 2022
bors bot added a commit that referenced this pull request Mar 22, 2022
2253: refactor authentication key extraction r=MarinPostma a=MarinPostma

I am concerned that the part of the code that performs the key prefix extraction from the jwt token migh be misused in the future. Since this is a critical part of the code, I moved it into it's own function. Since we deserialized the payload twice anyway, I reordered the verifications, and we now use the data from the validated token.


Co-authored-by: ad hoc <postma.marin@protonmail.com>
@bors
Copy link
Contributor

bors bot commented Mar 22, 2022

Build failed:

@ManyTheFish
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 28, 2022

@bors bors bot merged commit 513b37e into main Mar 28, 2022
@bors bors bot deleted the refactor-authentication-key-extraction branch March 28, 2022 09:13
@curquiza curquiza added the v0.27.0 PRs/issues solved in v0.27.0 label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.27.0 PRs/issues solved in v0.27.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants