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

cli: add simple token management commands #186

Open
slint opened this issue Oct 25, 2018 · 2 comments
Open

cli: add simple token management commands #186

slint opened this issue Oct 25, 2018 · 2 comments

Comments

@slint
Copy link
Member

slint commented Oct 25, 2018

Example:

# Create a token
$ invenio oauth2server create_personal_token "my-token" \
    --email [email protected] --internal \
    --scopes user:email,records:read
abcdef1234567890abcdef1234567890

# Delete a token
$ invenio oauth2server delete_personal_token --name "my-token" --email [email protected]
Token "abcdef1234567890abcdef1234567890" deleted

# ...or...
$ invenio oauth2server delete_personal_token 
Enter token: <password-like input>
Token "abcdef1234567890abcdef1234567890" deleted

(Command/parameter/argument naming could be better, so feel free to change...)

@lnielsen
Copy link
Member

Would this be better suited via the admin?

@slint
Copy link
Member Author

slint commented Oct 26, 2018

Well, why not both? The idea was to have it for API-only apps, which don't necessarily have an admin panel (or access to user settings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants