identity

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issuer

type Issuer interface {
	// Match checks if this issuer can authenticate tokens from a given issuer URL
	Match(ctx context.Context, url string) bool

	// Authenticate ID token and return Principal on success. The ID token's signature
	// is verified in the call -- invalid signature must result in an error.
	Authenticate(ctx context.Context, token string) (Principal, error)
}

type IssuerPool

type IssuerPool []Issuer

func (IssuerPool) Authenticate

func (p IssuerPool) Authenticate(ctx context.Context, token string) (Principal, error)

type Principal

type Principal interface {
	// Name is the email or subject of OIDC ID token. This value must match the
	// value signed in the proof of private key possession challenge.
	Name(ctx context.Context) string

	// Embed all SubjectAltName and custom x509 extension information into
	// certificate.
	Embed(ctx context.Context, cert *x509.Certificate) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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