Skip to content
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

Enforce and auto-document "access scopes" #1

Open
jankeromnes opened this issue Feb 13, 2017 · 0 comments
Open

Enforce and auto-document "access scopes" #1

jankeromnes opened this issue Feb 13, 2017 · 0 comments

Comments

@jankeromnes
Copy link
Member

Today, many JSON API endpoints require specific "access scopes" to be associated with the authenticated credential, and otherwise return an error (for example, GitHub's OAuth2 access tokens are associated a list of access scopes)

There is currently no authentication code or scope-verification code in SelfAPI, so both of these features need to be implemented manually (for example, with a server-middleware that authenticates access scopes, and by manually verifying in each API endpoint handler if the required scope is authorized for the current request).

Maybe there is a useful way to integrate "access scopes" (both request-level authentication and handler-level verification) into SelfAPI? This would have the following benefits:

  • API implementers don't need to write scope authentication and verification manually,
  • The automatically-generated documentation can indicate which access scopes exists, and which API endpoints require them.
@jankeromnes jankeromnes changed the title Support access scopes Auto-document and enforce "access scopes" Feb 13, 2017
@jankeromnes jankeromnes changed the title Auto-document and enforce "access scopes" Enforce and auto-document "access scopes" Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant