ggoc

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 7 Imported by: 0

README

ggoc

GitHub release MIT License

Generate Google OAuth2 Credential file for batch program.

Usage

Get client secret from Google Cloud Platform

First you create OAuth client and get client secret from Google Cloud Console.

  1. Go to Google Cloud Console
  2. Click API Manager
  3. Click Create Credentials
    1. Click Create OAuth Client ID
    2. Choose Other
    3. Fill Application name
  4. Get the client id and client secret
    1. Download client secret JSON from download button

then download client secret file. (this file path for -secret option)

Run command

After saving client secret you run ggoc as follow:

$ ggoc -secret CLIENT_SECRET_PATH \
       -credential CREDENTIAL_OUTPUT_PATH \
       -scope GOOGLE_OAUTH_SCOPE

The candidate of GOOGLE_OAUTH_SCOPE is listed here.

Get OAuth token from browser

OAuth authorization requires

  1. 'Go to the following link in your browser then type the authorization code' log and Authorization URL display on console
  2. Copy and paste authorization URL on browser address bar
  3. OAuth token displays if authorization success.
  4. Copy and paste OAuth token to console and hit enter key

After those procedure, you can get credential file detected -credential option.

Install

If you are macOS user, you can install via Homebrew.

$ brew tap noissefnoc/homebrew-ggoc
$ brew install ggoc

Other OS users can download binary from release page.

And you can also use go get

$ go get -u github.com/noissefnoc/ggoc

License

MIT

Author

Kota Saito

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL