auth

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingMetadata             = errors.New("missing metadata")
	ErrInvalidMetadata             = errors.New("invalid metadata")
	ErrSignatureVerificationFailed = errors.New("signature verification failed")
)

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	AuthenticateUser(ctx context.Context, role UserRole) (context.Context, error)
}

func New

func New(manifest agent.Computation) (Authenticator, error)

type UserRole

type UserRole string
const (
	UserMetadataKey                = "user-id"
	SignatureMetadataKey           = "signature"
	ConsumerRole          UserRole = "consumer"
	DataProviderRole      UserRole = "data-provider"
	AlgorithmProviderRole UserRole = "algorithm-provider"
)

Jump to

Keyboard shortcuts

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