Skip to content

change token to TextField in AbstractAccessToken model #1447

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

Merged
merged 7 commits into from
Aug 13, 2024

Conversation

fazeelghafoor
Copy link
Contributor

@fazeelghafoor fazeelghafoor commented Aug 2, 2024

Fixes #1412

Description of the Change

  • Changed token field to TextField and added TokenChecksumField in AbstractAccessToken model.
  • Updated middleware, validators, and views to use token checksums.
  • Modified test migrations to include token_checksum in sampleaccesstoken model.
  • Added tests for token checksum field.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@fazeelghafoor
Copy link
Contributor Author

@n2ygk please review and let me know if anything needs to change

@fazeelghafoor fazeelghafoor changed the title change token field to TextField in AbstractAccessToken model change token to TextField in AbstractAccessToken model Aug 2, 2024
@n2ygk n2ygk self-requested a review August 5, 2024 14:59
Copy link
Member

@n2ygk n2ygk left a comment

Choose a reason for hiding this comment

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

Thanks for this!

I made a small wording change to the CHANGELOG to make it more clear why this change is useful.

I also have a question about whether a swappable dependency is needed. I always have trouble understanding how exactly these migrations are supposed to work with swappable models and would like someone else from @jazzband/django-oauth-toolkit to further review this.

@n2ygk n2ygk requested a review from a team August 5, 2024 15:36
fazeelghafoor and others added 3 commits August 5, 2024 16:28
- add TokenChecksumField field
- update middleware, validators, and views to use token checksums for token retrieval and validation
- modified test migrations to include token_checksum field in "sampleaccesstoken" model
- add test for token checksum field
Co-authored-by: Alan Crosswell <[email protected]>
@n2ygk n2ygk force-pushed the feat/add-token-checksum branch from 0adb025 to 68e7f9b Compare August 5, 2024 20:28
@n2ygk n2ygk requested a review from dopry August 8, 2024 17:56
@n2ygk
Copy link
Member

n2ygk commented Aug 8, 2024

@dopry since I see you are actively looking at DOT right now, would you mind reviewing this PR please?

@n2ygk
Copy link
Member

n2ygk commented Aug 13, 2024

oops my rebase messed up the migrations. will fix it.

@n2ygk
Copy link
Member

n2ygk commented Aug 13, 2024

I'm embarrassed to say I've made yet another error. This time I'm running tox locally before pushing!

@n2ygk n2ygk merged commit dc3d8ff into jazzband:master Aug 13, 2024
27 checks passed
@n2ygk n2ygk added this to the 3.0.0 milestone Aug 13, 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.

Remove 255 Character Limit on Tokens to Support JWT with Additional Claims
2 participants