This repository has been archived by the owner on May 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 652
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
needs #118 to be merged first. |
@ticosax thanks for taking this over. I got really busy with work and haven't had a chance to pick this back up. |
@fxdgear thank you for the implementation ! 😄 |
@fxdgear please can you tell me what is the reasoning behind the unicity of app field ? class RefreshToken(models.Model):
app = models.CharField(max_length=255, unique=True) I think it should be: class RefreshToken(models.Model):
class Meta:
unique_together = ('user', 'app') instead. |
@ticosax oh you're right. It should be |
@fxdgear Thank you for your answer. I updated the PR to reflect the change |
👍 |
I will rebase now #118 is merged |
This allows for a client to request refresh tokens. These refresh tokens do not expire. They can be revoked (deleted). When a JWT has expired, it's possible to send a request with the refresh token in the header, and get back a new JWT. This allows for the client to not have to store username/passwords. So, if the client gets a responce about an expired token the client can automatically make a call (behind the scenes) to delegate a new JWT using the stored refresh token. Thus keeping the 'session' active. moving everything to it's own sub dir, so that the refresh token functionality can be optionally installed.
and choose constraint for user and app together
ticosax
force-pushed
the
long_running_refresh_tokens
branch
from
May 19, 2015 07:19
63a70fc
to
f498cf0
Compare
The delegation endpoint is a `POST`, with the following body. ```json { "client_id": "YOUR_CLIENT_ID", "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer", "refresh_token": "your_refresh_token", "api_type": "app" } ```
will come back in a better shape |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 is an attempt to resume work started in #94
@fxdgear It is mostly your work here.