lotorhttp

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package lotorhttp exposes browser-safe, same-origin HTTP adapters for Lotor-owned commands. It keeps Control application bearers and runtime credentials outside browser JavaScript.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSession = errors.New("application session not found")

ErrNoSession indicates that an opaque application session is absent or expired.

Functions

This section is empty.

Types

type Handler

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

func New

func New(options Options) (*Handler, error)

New constructs a production gateway backed by Control identity verification and owned LWP.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Identity

type Identity struct {
	Subject       string
	Email         string
	TenantID      string
	ApplicationID string
	EnvironmentID string
}

Identity is verified from Control for every lifecycle command.

type Options

type Options struct {
	TLSConfig  *tls.Config
	Sessions   SessionStore
	ControlURL string
	APIKey     string
	CookieName string
}

Options configures the reusable browser command gateway.

type SessionStore

type SessionStore interface {
	Bearer(context.Context, string) (string, error)
	Delete(context.Context, string) error
}

SessionStore resolves the opaque application cookie to the Control bearer held by the BFF.

Jump to

Keyboard shortcuts

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