authv2

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainString = "agent auth v2"
)

Variables

This section is empty.

Functions

func NewClientChallenge

func NewClientChallenge(kr keyring.Keyring, clientId string, logger *slog.Logger) (challenges.ChallengeHandler, error)

func NewServerChallenge

func NewServerChallenge(verifier challenges.KeyringVerifier, logger *slog.Logger, opts ...ChallengeOption) challenges.ChallengeHandler

func ShouldEnableIncoming

func ShouldEnableIncoming(streamContext context.Context) (bool, error)

Checks if the incoming context has the challenge version metadata key set to v2.

Types

type ChallengeOption

type ChallengeOption func(*ChallengeOptions)

func WithChallengeTimeout

func WithChallengeTimeout(challengeTimeout time.Duration) ChallengeOption

type ChallengeOptions

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

type Client

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

func (*Client) DoChallenge

func (a *Client) DoChallenge(clientStream streams.Stream) (context.Context, error)

func (*Client) InterceptContext

func (a *Client) InterceptContext(ctx context.Context) context.Context

type Server

type Server struct {
	ChallengeOptions
	// contains filtered or unexported fields
}

func (*Server) DoChallenge

func (a *Server) DoChallenge(ss streams.Stream) (context.Context, error)

func (*Server) InterceptContext

func (a *Server) InterceptContext(ctx context.Context) context.Context

Jump to

Keyboard shortcuts

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