server: go.chromium.org/goma/server/auth/account Index | Files

package account

import "go.chromium.org/goma/server/auth/account"

Package account manages service account.

Index

Package Files

empty.go mint.go

type Account Uses

type Account interface {
    // Equals compare account with other.
    Equals(other Account) bool

    // Token generates new oauth2 token for the account.
    Token(ctx context.Context) (*oauth2.Token, error)
}

Account represents service account.

type Empty Uses

type Empty struct{}

Empty doesn't provide any service accounts.

func (Empty) New Uses

func (e Empty) New(name string) (Account, error)

type JSONDir Uses

type JSONDir struct {
    Dir    string
    Scopes []string
}

JSONDir is a Pool with json files. It should be used for experiments only. we need to rotate keys. It uses application default credential, if "default" is requested. https://cloud.google.com/docs/authentication/production

func (JSONDir) New Uses

func (j JSONDir) New(name string) (Account, error)

New creates new account by loading json file in the dir. if name is "default", returns default service account instead.

type Pool Uses

type Pool interface {
    // New creates new account for name.
    New(name string) (Account, error)
}

Pool manages service accounts.

Package account imports 9 packages (graph) and is imported by 4 packages. Updated 2019-06-27. Refresh now. Tools for package owners.