Skip to main content

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/<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/<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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oauth2token-0.0.1.post3.tar.gz (15.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page