iam

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: BSD-2-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

Client represents an IAM client.

func NewClient

func NewClient() *Client

NewClient returns a new IAM client.

func (*Client) GenerateIDToken

func (iam *Client) GenerateIDToken(serviceAccountMappingResult *mappings.ServiceAccountMappingResult, audience string) (string, error)

GenerateIDToken returns a service account id token for for the given audience using The IAM Credentials API.

func (*Client) ImpersonateServiceAccount

func (iam *Client) ImpersonateServiceAccount(serviceAccountMappingResult *mappings.ServiceAccountMappingResult) (*Credentials, error)

ImpersonateServiceAccount returns a service account access token using The IAM Credentials API.

type Credentials

type Credentials struct {
	AccessToken string `json:"access_token"`
	ExpiresAt   int    `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

Credentials represent an OAuth Access token

Jump to

Keyboard shortcuts

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