Documentation
¶
Overview ¶
Package gcpcredential contains functions to validate Google-issued ID tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
func Validate(ctx context.Context, client *http.Client, credentials []string, expectedAudience string) ([]string, error)
Validate validates each of the provided credentials, then returns the emails of the successfully verified tokens/emails. If an http.Client is provided, it will be used to initialize the idtoken validation client.
func ValidateWithJWKS ¶
ValidateWithJWKS validates the provided credentials using the provided public keys. It is the caller's responsibility to retrieve and provide Google's JWKs (https://www.googleapis.com/oauth2/v3/certs).
Types ¶
Directories
¶
Path | Synopsis |
---|---|
Package main is a simple program to test the gcpcredential library against a GCP-issued token.
|
Package main is a simple program to test the gcpcredential library against a GCP-issued token. |
Click to show internal directories.
Click to hide internal directories.