oidc

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *defaultTool

Types

type AuthOption added in v0.1.10

type AuthOption func(*AuthOptions)

func WithExpectedAudience added in v0.1.10

func WithExpectedAudience(audience string) AuthOption

func WithExpectedIssuer added in v0.1.10

func WithExpectedIssuer(issuer string) AuthOption

func WithHeaderKey added in v0.1.10

func WithHeaderKey(headerKey string) AuthOption

func WithPrefix added in v0.1.10

func WithPrefix(prefix string) AuthOption

type AuthOptions added in v0.1.10

type AuthOptions struct {
	HeaderKey        string
	Prefix           string
	ExpectedAudience string
	ExpectedIssuer   string
}

func ApplyAuthOptions added in v0.1.10

func ApplyAuthOptions(opts *AuthOptions, modifiers ...AuthOption) AuthOptions

type Blackbox

type Blackbox interface {
	// contains filtered or unexported methods
}

type Client

type Client interface {
	Blackbox
	AuthenticateOIDC(ctx context.Context, r *http.Request, opts AuthOptions) (*contract.RespAuth, error)
	CreateOIDCToken(ctx context.Context, fsys fs.ReadFileFS, credentialsPath string, audience string) (*oauth2.Token, error)
}

func NewClient

func NewClient(d Dependencies) (Client, error)

type Dependencies added in v0.1.8

type Dependencies struct {
	FR contract.FSysFileReader
}

Jump to

Keyboard shortcuts

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