-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update OAuth scopes #143
Comments
I'd like to do this, including the addition of both admin scopes and all child scopes and also the deprecation of our definition of Regarding our definition of Reason: Redefining
In the future, anyone requesting full access should just do this by something like Any objections? |
Also marking this as necessary for 2.0.0. We do have some admin methods by now, but lack the possibility for users to declare the scopes necessary to access them. |
- makes all scope parameters in OAuth and App methods optional. Endpoints not receiving a scope parameter will default to granting "read" permission. - removes default parameter value from Scope constructor. Users will need to define a certain scope if they want to use it. Closes andregasser#116. - adds all scopes as defined by Mastodon, marks existing scopes FOLLOW and ALL as deprecated. - removes all internal usage of the now deprecated ALL scope. Closes andregasser#143. - moves deduplication of scopes from a separate function into the one building the parameter string. This avoids unnecessarily throwing an IllegalArgumentException. Closes andregasser#381.
* Update scopes used in OAuth - makes all scope parameters in OAuth and App methods optional. Endpoints not receiving a scope parameter will default to granting "read" permission. - removes default parameter value from Scope constructor. Users will need to define a certain scope if they want to use it. Closes #116. - adds all scopes as defined by Mastodon, marks existing scopes FOLLOW and ALL as deprecated. - removes all internal usage of the now deprecated ALL scope. Closes #143. - moves deduplication of scopes from a separate function into the one building the parameter string. This avoids unnecessarily throwing an IllegalArgumentException. Closes #381. * Enhance Scope usage in tests - in integration tests, declare "full scope" once - in unit tests, do not specify any Scope unless directly tested - remove deprecated "follow" scope from the access token asset * In samples to get access token, ensure that scopes requested for the token match those in OAuth URL. * Enable hierarchical access to defined scopes - replace Name enum with hierarchical structure for a more intuitive access to individual scopes - changing samples and USAGE.md to match Examples: - Scope(Scope.Name.READ) becomes Scope(Scope.READ.ALL) - Scope(Scope.Name.ADMIN_READ_ACCOUNTS) becomes Scope(Scope.ADMIN.READ.ACCOUNTS) --------- Co-authored-by: Patrick Geselbracht <code@patrick-geselbracht.eu>
The Mastodon OAuth Scopes page specifies additional scopes for
push
and admin related scopes. We should at least provide these scopes as well:push
The
follow
scope has been deprecated in Mastodon 3.5.0 and we should mark it eventually. Users should start to requestread
and/orwrite
scope instead.The admin scopes
admin:read
andadmin:write
can be left aside for the moment, as we do not implement any of the admin calls yet.The text was updated successfully, but these errors were encountered: