Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCPTokenSource ¶
type GCPTokenSource struct {
// contains filtered or unexported fields
}
func NewGCPTokenSource ¶
func NewGCPTokenSource(ctx context.Context, client *http.Client, scopes []string) (*GCPTokenSource, error)
NewGCPTokenSource creates a token source for GCP access tokens.
`client` parameter is optional. If you supply your own client, you have to make sure you set the correct authentication headers yourself. If no client is given, authentication information is looked up from the environment. `defaultSAName` specifies the GCP IAM service accoutn name to use if no dedicated service account is configurred on the key.
func (*GCPTokenSource) Token ¶
func (g *GCPTokenSource) Token(ctx context.Context, saName, saDelegateName string) (*TokenResponse, error)
Token returns an access token for the configured service account and scopes.
Click to show internal directories.
Click to hide internal directories.