agentauth

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForwardClaims

type ForwardClaims struct {
	SourceAgentID string `json:"source_agent_id"`
	Capability    string `json:"capability"`
	jwt.RegisteredClaims
}

type ForwardTicket

type ForwardTicket string

type KeySource

type KeySource interface {
	LookupKey(keyID string) (ed25519.PublicKey, bool)
}

type PublicKey

type PublicKey struct {
	KeyID     string `json:"key_id"`
	Algorithm string `json:"algorithm"`
	Key       []byte `json:"key"`
}

type RelayClaims

type RelayClaims struct {
	AgentID           string `json:"agent_id"`
	MasterInstanceID  string `json:"master_instance_id"`
	DesiredGeneration uint64 `json:"desired_generation"`
	jwt.RegisteredClaims
}

type RelayTicket

type RelayTicket string

type Verifier

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

func NewVerifier

func NewVerifier(keys KeySource) *Verifier

func (*Verifier) VerifyForward

func (v *Verifier) VerifyForward(raw ForwardTicket) (*ForwardClaims, error)

func (*Verifier) VerifyRelay

func (v *Verifier) VerifyRelay(
	raw RelayTicket,
	expectedAgentID string,
	expectedMasterID string,
	desiredGeneration uint64,
) (*RelayClaims, error)

func (*Verifier) VerifyWelcome

func (v *Verifier) VerifyWelcome(raw string, expected WelcomeProofClaims) error

type WelcomeProofClaims

type WelcomeProofClaims struct {
	AgentID           string `json:"agent_id"`
	Nonce             string `json:"nonce"`
	MasterInstanceID  string `json:"master_instance_id"`
	SessionGeneration uint64 `json:"session_generation"`
	DesiredGeneration uint64 `json:"desired_generation"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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