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

Send JWT token expiration date along with APIs response #39

Closed
5 tasks done
isabelcosta opened this issue Jun 8, 2018 · 2 comments
Closed
5 tasks done

Send JWT token expiration date along with APIs response #39

isabelcosta opened this issue Jun 8, 2018 · 2 comments
Assignees
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program. Type: Enhancement New feature or request.

Comments

@isabelcosta
Copy link
Member

isabelcosta commented Jun 8, 2018

Description

As a developer/consumer,
I need send the JWT token expiry date,
so that I can, be aware of the expiry date when I receive the access_token.

Send the expiry date of the token along with POST /login response.

Current login response structure:

{
      "access_token": "YOUR_TOKEN",
}

New login response structure:

{
      "access_token": "YOUR_TOKEN",
      "expiry": "EXPIRY_DATE_UNIX_TIMESTAMP"
}

Acceptance Criteria

Update

  • Update current to new response returned by the Login API
  • Decide on JSON response structure (discuss on slack's #mentorship-system channel)
  • Update Swagger Documentation file

Definition of Done

  • All of the required items are completed.
  • Approval by 1 mentor.

Estimation

4 hours

@isabelcosta isabelcosta added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Difficulty: MEDIUM Program: GSOC Related to work completed during the Google Summer of Code Program. Type: Enhancement New feature or request. labels Jun 8, 2018
@isabelcosta isabelcosta self-assigned this Jun 8, 2018
@isabelcosta
Copy link
Member Author

@m-murad @Dilu9218 I created this issue referring to @m-murad 's comment.
To do this I'll study the JWT flask extension to see how to do this and discuss on slack the appropriate response structure.

@isabelcosta
Copy link
Member Author

This blog post's section "Authentication Response Handler" helped me do this.
URL: http://blog.tecladocode.com/learn-python-advanced-configuration-of-flask-jwt/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program. Type: Enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants