Back to godoc.org

Package client

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Overview

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

Index

func GetAccessToken

func GetAccessToken(ctx 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

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier