credentials

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package credentials is how an embedder supplies material for one upstream call. The binary's sources stay in config: env, login, client_credentials, invoke, command, and token_exchange.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Headers   map[string]string
	Query     map[string]string
	ExpiresAt time.Time
	Sign      func(*http.Request) error
}

Credential is applied immediately before HTTP. Sign is optional and runs after the request is built.

type Provider

type Provider interface {
	Resolve(ctx context.Context, in Request) (Credential, error)
}

Provider obtains credential material for one request. It does not know the company's auth scheme.

type ProviderFunc added in v0.1.5

type ProviderFunc func(ctx context.Context, in Request) (Credential, error)

ProviderFunc lets a closure satisfy Provider.

func (ProviderFunc) Resolve added in v0.1.5

func (f ProviderFunc) Resolve(ctx context.Context, in Request) (Credential, error)

type Request

type Request struct {
	OperationID string
	Method      string
	URL         string
	Scheme      string
	UserToken   string
	Scopes      []string
	Audience    string
}

Request is the call that needs a credential.

Jump to

Keyboard shortcuts

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