handlers

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: GPL-3.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OPAQUEHandler

func OPAQUEHandler(agentID uuid.UUID, o opaque.Opaque) (messages.Base, error)

OPAQUEHandler processes and dispatches OPAQUE messages for authenticated agents Messages should only allow: AuthComplete

func OPAQUEUnAuthHandler

func OPAQUEUnAuthHandler(agentID uuid.UUID, o opaque.Opaque, key kyber.Scalar) (messages.Base, error)

OPAQUEUnAuthHandler accepts messages from an unauthenticated agent Messages should only allow: RegInit RegComplete AuthInit

Types

type Context

type Context struct {
}

Context structure is used to ensure all handlers have a standardized set of fields

type ContextInterface

type ContextInterface interface {
}

ContextInterface is used for embedded structures and subtyping

type HTTPContext

type HTTPContext struct {
	Context
	PSK       string       // The pre-shared key password used prior to Password Authenticated Key Exchange (PAKE)
	JWTKey    []byte       // The password used by the server to create JWTs
	OpaqueKey kyber.Scalar // OPAQUE server's keys
}

HTTPContext contains contextual information about a handler such as secrets for encrypt/decrypt

func (*HTTPContext) AgentHTTP

func (ctx *HTTPContext) AgentHTTP(w http.ResponseWriter, r *http.Request)

AgentHTTP function is responsible for all Merlin agent traffic

Jump to

Keyboard shortcuts

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