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

feat: add token prefix option #272

Merged
merged 1 commit into from
Aug 24, 2022
Merged

feat: add token prefix option #272

merged 1 commit into from
Aug 24, 2022

Conversation

max-wittig
Copy link
Contributor

@max-wittig max-wittig commented Jul 20, 2022

Hi @belugame, @James1345

Thanks for creating django-rest-knox!

This feature will add an optional token prefix to the library that can be used to detect these tokens easily and quickly revoke them in case they are leaked. The same mechanism is also used by GitHub and GitLab. See also the issue: #271

This is just a MR to see, if you would accept that feature. I will provide tests and documentation, once you approve.

Fixes #271

@dlouzan @bufferoverflow @fh1ch @nejch

@James1345
Copy link
Member

I think this is a good idea :) Happy to take this on board with tests and docs

knox/crypto.py Outdated Show resolved Hide resolved
@max-wittig
Copy link
Contributor Author

@James1345 Added tests and docs. Feel free to review!

@max-wittig
Copy link
Contributor Author

@James1345 Hi! Could you give it another look?

@max-wittig
Copy link
Contributor Author

@James1345 Hi! Would be really cool to have it. I don't wanna spam you though, but maybe you could have another look. Just let me know, what to change or adjust.

@James1345
Copy link
Member

James1345 commented Aug 5, 2022 via email

@max-wittig
Copy link
Contributor Author

@James1345 Friendly ping.

@James1345
Copy link
Member

@max-wittig Approved, can you fix the merge conflicts and I'll merge it :)

@max-wittig
Copy link
Contributor Author

@James1345 Rebased.

@max-wittig
Copy link
Contributor Author

@James1345 Hi! I don't really wanna rebase one more time. Could we get it in please? 😄

@James1345
Copy link
Member

Hi @max-wittig, yes I won't merge anything else until this one is done now - sorry for the trouble.

Can you look at why the tests are failing though please?

@max-wittig
Copy link
Contributor Author

Tests fixed.

@James1345 James1345 merged commit 3a1bc58 into jazzband:develop Aug 24, 2022
@James1345
Copy link
Member

Merged, I'll try to get a release done soon as we've had a few merges this month

@max-wittig
Copy link
Contributor Author

@James1345 Thank you!!

@max-wittig max-wittig deleted the feat-token-prefix branch August 24, 2022 13:30
Rotzbua pushed a commit to Rotzbua/django-rest-knox that referenced this pull request Jan 8, 2023
dontexit pushed a commit to dontexit/django-rest-knox that referenced this pull request Jan 24, 2024
johnraz pushed a commit to johnraz/django-rest-knox that referenced this pull request Jul 1, 2024
johnraz pushed a commit to johnraz/django-rest-knox that referenced this pull request Jul 1, 2024
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.

Support token prefix
2 participants