oidcauth

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, name string, config login.OIDCConfig, path string, callbackSrv *login.CallbackServer) (tokenauth.Source, func() error, error)

New constructs OIDC tokenauth.Source that optionally supports logging in if callbackSrc is not nil. Additionally it returns clearIDToken function that can be used to clear the token if needed. TokenSource is by default configured to use disk as cache for tokens.

func NewGoogleFromServiceAccount

func NewGoogleFromServiceAccount(ctx context.Context, name string, config login.OIDCConfig, googleServiceAccountJSON []byte) (tokenauth.Source, error)

NewGoogleFromServiceAccount constructs tokenauth.Source that is able to return valid OIDC token from given Google Service Account.

func NewWithCache

func NewWithCache(ctx context.Context, name string, cache login.Cache, callbackSrv *login.CallbackServer) (tokenauth.Source, func() error, error)

NewWithCache is same as New but allows to pass custom cache e.g k8s one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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