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
It could be neat to provide a way of determining the necessary scopes to execute a given call. The use case would be applications that gradually expand access rights. They could then gather all the necessary scopes based on calls made or when encountering an error.
It could be implemented as a function that inspects an attribute set by a decorator. The function itself could return two values, one for required scopes, and the other for extra scopes e.g. in the playlist case access to private playlists. Or we could have two functions.
Another wild idea, we could have the necessary scopes attached to the error object.
The text was updated successfully, but these errors were encountered:
Providing missing scopes on errors would require catching the error an re-raising it. I think we'll not do that at least yet to keep things a bit lighter. And I think an attribute is enough.
These scope attributes have another benefit though: we can use them to automatically build documentation, so that's nice.
It could be neat to provide a way of determining the necessary scopes to execute a given call. The use case would be applications that gradually expand access rights. They could then gather all the necessary scopes based on calls made or when encountering an error.
It could be implemented as a function that inspects an attribute set by a decorator. The function itself could return two values, one for required scopes, and the other for extra scopes e.g. in the playlist case access to private playlists. Or we could have two functions.
Another wild idea, we could have the necessary scopes attached to the error object.
The text was updated successfully, but these errors were encountered: