gce

package
v0.0.0-...-84ddfae Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

Authenticator authenticates GCE instance identity tokens.

func NewAuthenticator

func NewAuthenticator(
	computeInstanceIdentityVerifier *jaspercompute.InstanceIdentityVerifier,
	identityStore auth.IdentityStore) (*Authenticator, error)

NewAuthenticator creates a *Authenticator who's Authenticate decodes and verifies a GCE instance identity JWT token and returns the *auth.Identity with the GCE instance identity (by doing a lookup into identityStore).

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(ctx context.Context, bearerToken string) (any, error)

Authenticate decodes and verifies a GCE instance identity JWT token and either returns a non-nil *auth.Identity (first return parameter) or a non-nil error (second return parameter). The *auth.Identity is looked up from the auth.IdentityStore passed to NewAuthenticator.

Jump to

Keyboard shortcuts

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