luci: go.chromium.org/luci/appengine/gaeauth/client Index | Files

package client

import "go.chromium.org/luci/appengine/gaeauth/client"

Package client implements OAuth2 authentication for outbound connections from Appengine using the application services account.

Index

Package Files

client.go

func GetAccessToken Uses

func GetAccessToken(c context.Context, scopes []string) (*oauth2.Token, error)

GetAccessToken returns an OAuth access token representing app's service account.

If scopes is empty, uses auth.OAuthScopeEmail scope.

Implements a caching layer on top of GAE's GetAccessToken RPC. May return transient errors.

func NewTokenSource Uses

func NewTokenSource(ctx context.Context, scopes []string) oauth2.TokenSource

NewTokenSource makes oauth2.TokenSource implemented on top of GetAccessToken.

It is bound to the given context.

Package client imports 14 packages (graph) and is imported by 4 packages. Updated 2018-12-16. Refresh now. Tools for package owners.