Oauth2 token management for cli applications
Project description
Simple cli tools to create and use oauth2token
Configuration
You need to create config.json
and scopes.json
at
$XDG_CONFIG_HOME/oauth2token/<provider>/
for each provider you want
to use.
config.json
:
See Google client_secret.json.
You’ll need to obtain your own from the provider.
scopes.json
:
The scope your application need as a json array.
Example :
["https://mail.google.com/"]
Usage
oauth2create
<provider> <account>
Obtain and store credentials in $XDG_DATA_HOME/oauth2token/<provider>/<account> in binary form, using the configuration for that provider. It use the “Installed App flow” open a brower where you’ll need to log in the account you want to use, then redirect to the loopback address to obtain the credentials.
oauth2get
<provider> <account>
Output the access token for that account, refreshing it if needed with the associated refresh token.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for oauth2token-0.0.2.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f27041084f557d593c4043b56528d7a7cfbb016664de1c9f163bc671e54b0a0 |
|
MD5 | 46a2116ccb94338110b280b756d94186 |
|
BLAKE2b-256 | eda9953e7dd2ecd64d26df616b2fb2a86dab26c64c1f233feb1c1245c4d4243a |