generetate-google-id-token

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 17 Imported by: 0

README

Generate Google ID Token

This tool allows the generation of a Google ID Token from a service account json key. Such token can be used for authentication in GCP API Gateway and Cloud Endpoints. A valid token represents a legitimate service account.

Generating the token has two phases:

  • Generating a self-signed JWT with the service account private key.
  • Using the JWT to call OAuth2 Google endpoint to generate a token.

Installation

Install from source

go get github.com/pmorelli92/generetate-google-id-token

Usage

Flag Description Default Required
saPath Path to the service account json file. X
scopes Space separated list of JWT scopes. X
expTime Expiration time in format of nx where n can be any number and x can be s, m, h 15m

Example

./generate-google-id-token -scopes="some-scope" -saPath="file.json"

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