gateway

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AuthEndpoint is the endpoint for the gateway authentication.
	// This is defined here since the endpoint is part of the signature
	// protocol, which both the gateway and client are expected to follow.
	AuthEndpoint = "/auth"
)

Variables

View Source
var (
	// ErrAuthenticationFailed is returned when the gateway authentication fails.
	// This is usually due to an incorrect signature.
	ErrAuthenticationFailed = fmt.Errorf("gateway authentication failed")

	// ErrGatewayNotAuthenticated is returned when the client is not authenticated
	// with the gateway.
	ErrGatewayNotAuthenticated = fmt.Errorf("gateway not authenticated")
)

Functions

This section is empty.

Types

type GatewayClient

type GatewayClient interface {
	// Auth sends an authentication request to the gateway.
	// It will set a cookie in the client if successful.
	Auth(ctx context.Context, req *gateway.GatewayAuth) error

	// GetAuthParameter returns the parameters that will be used to compose the
	// authentication message that will be signed by the client.
	GetAuthParameter(ctx context.Context) (*gateway.GatewayAuthParameter, error)
}

GatewayClient is the interface for the Kwil gateway client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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