-
Notifications
You must be signed in to change notification settings - Fork 15
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 support for multiple API tokens with expanded functionality #639
Conversation
0dfa4b3
to
868b14f
Compare
868b14f
to
9aab3dd
Compare
202b3d4
to
ff4b57c
Compare
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 your work, I think some part of this code can be optimized!
a241594
to
aa6ba6e
Compare
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 the changes!
Although not entirely linked with this PR, I would mention that the file organization seems a little messy (test in one Django application, views in another Django app and lastly tests in a third one).
Following discussions on another medium to separate the different tokens (SDK and Frontend), if you decide having different tables for the different kinds of tokens and they are both using the same (or a similar) model I would recommend looking in abstract classes
3dfdde1
to
1ddd19e
Compare
6295db2
to
9cf85ca
Compare
Signed-off-by: Léo-Paul HAUET <[email protected]>
Signed-off-by: Léo-Paul HAUET <[email protected]>
Signed-off-by: Léo-Paul HAUET <[email protected]>
Signed-off-by: Léo-Paul HAUET <[email protected]>
9cf85ca
to
6a08f72
Compare
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 all the changes, it looks good, although I think some parts still needs small refinements.
57f4f49
to
7b7db22
Compare
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 your work! I just noticed a comment that seems to be not meant to be left in the code
valid_auth_token_header = f"Token {token_2}" | ||
api_client.credentials(HTTP_AUTHORIZATION=valid_auth_token_header) | ||
|
||
response = api_client.get("/active-api-tokens/") # none type error here ?? |
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.
This comment looks temporary
Signed-off-by: Léo-Paul HAUET <[email protected]>
7b7db22
to
bfc373e
Compare
Description
https://app.asana.com/0/1204424791229302/1204269294564790
New
BearerToken
model:active-api-tokens
received a new delete methodapi-token-auth
changed, now you can specify an expiry date and a note, no expiry date means an imperishable tokenHow has this been tested?
Checklist
TODO
TOKEN_STRATEGY