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.
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 device authorization grant (device code flow - rfc 8628) #1539
base: master
Are you sure you want to change the base?
Add device authorization grant (device code flow - rfc 8628) #1539
Changes from all commits
b26e5bd
58a06b4
f73ca8c
c3abd4a
9daf17d
6595265
05fd9f1
96bb11a
2a2d959
07d0473
184b19a
594ac55
c929a8f
0a7cfc5
37dc653
3cc49db
3f1fbc4
a948c0a
1343359
1b8d2ca
af11d0e
b63d7e0
f8774c3
c3b918c
cbc4b77
c2243dc
cc328ba
5039617
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Likewise maybe
DeviceGrant
?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.
It's not the grant, it's the model that represents the device during the flow's session,
this is the device grant
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.
In the context of
oauthlib
(which doesn't require Django) that is the device grant, yes. But indjango-oauth-toolkit
this represents the pending flow that gets persisted. This is very similar to DOT'sGrant
class which also has counterparts inoauthlib
like AuthorizationCodeGrant.I think this very much is the Grant. Note that most of the fields are the same, scope, client_id, expiration, etc.
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 seems to be what I'm saying as well. Because it represents the device session and uses the device grant in that session.
Am I misunderstanding grant in Oauth2? I define it as a single object that is of some type but doesn't have anything to do with state/session
The
Grant
inDOT
is for the authorization code flow. It may have similar columns for its table but that's not the full story with the device here.Device
here would be more akin to the authorization code flow itself than just the grant it usesWhile
Grant
is a static object,Device
here is used to track changing state through the flow