-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add ODKToken Authentication Method #1705
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Create new tests for the odk_token action within TestConnectViewSet
- Rename id_token variable
- Pass in a str instead of an object to DigestAuth
ivermac
previously approved these changes
Oct 17, 2019
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.
lgtm!
ukanga
requested changes
Oct 17, 2019
- Directly assigning values to data dict rather than use a function
- Store the key value in an encrypted format - Generate new migration for the ODKToken Model
- Check that passing the raw_token authenticates the user
- Change field 'odk_token' to 'enc_odk_token' - Change field 'expires_in' to 'active_till' - Update tests
- Regenerate migrations
DavisRayM
force-pushed
the
odk-token-authentication
branch
2 times, most recently
from
October 18, 2019 11:20
f18811b
to
85d34e7
Compare
- Chance Active and Inactive value - Recreate migrations
DavisRayM
force-pushed
the
odk-token-authentication
branch
from
October 18, 2019 11:36
85d34e7
to
310f5ce
Compare
- Lint code
- Remove ODK_TOKEN_FERNET_KEY variable
- Minor Code Cleanup - Add ability to make PATCH Requests - Add ability to change ODKToken Status
- Minor code cleanup
- Test that ODK Token status can be changed through a PATCH request
ukanga
previously approved these changes
Oct 22, 2019
- Change DigestAccountStorage to ODKTokenAccountStorage - Add additional information to the ODKTokenAccountStorage docstring
DavisRayM
force-pushed
the
odk-token-authentication
branch
from
October 23, 2019 06:26
3860530
to
5847d74
Compare
- Use ODKTokenAccountStorage while testing expiry date failure
ukanga
requested changes
Oct 25, 2019
- Add get_partial_digest method - Check that the users ODK Token has not expired before returning a partial digest
- Create a key on GET if one is non-existent or non is active
- Use the token.expires property to check if the Token has expired
ukanga
approved these changes
Oct 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new Digest Authentication method name "ODKTokenAuthentication" which accepts an email and ODKToken generated on the onadata platform.
Changes Implemented in this PR
ODK_KEY_LIFETIME
andODK_TOKEN_LENGTH
/api/v1/user/odk_token
that acceptsGET
andPOST
requestsODKTokenAuthentication