You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DRF permissions class TokenHasResourceScope requires tokens use a colon-separated syntax to explicitly specify read/write scopes (ie. "music:read music:write"). This scope syntax is mentioned nowhere within the docs as far as I've found.
The following info seems like it would be necessary to understand to successfully utilize this workflow.
Based on this example from the TokenHasResourceScope docs....
A valid token's scope is set in this fashion, to grant both read and write permissions for this view.
music:read music:write
However, defining a token's scope without appending specific read and/or write access will not work
music
Settings
Within your scope settings, you must declare each scope explicitly
OAUTH2_PROVIDER = {
'SCOPES': {
'music:read' : 'Read music accessible by your account.',
'music:write' : 'Write music accessible by your account.',
...
}
The text was updated successfully, but these errors were encountered:
I just found this issue today, trying to work out the docs. Is there anything that I could do to help get into the docs for others? I could raise a PR with the changes required?
The DRF permissions class
TokenHasResourceScope
requires tokens use a colon-separated syntax to explicitly specify read/write scopes (ie. "music:read music:write"). This scope syntax is mentioned nowhere within the docs as far as I've found.The following info seems like it would be necessary to understand to successfully utilize this workflow.
Based on this example from the TokenHasResourceScope docs....
Token Scope Syntax
A valid token's scope is set in this fashion, to grant both read and write permissions for this view.
However, defining a token's scope without appending specific read and/or write access will not work
Settings
Within your scope settings, you must declare each scope explicitly
The text was updated successfully, but these errors were encountered: