signapi

package
v0.0.0-...-7349942 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package signapi implements the v1 HTTP API: login, certificate signing and CA key management. Login state is carried between requests in short-lived HS256 JWTs that embed the AuthContext.

Index

Constants

View Source
const (
	MaxAuthContextChainLength = 8
)
View Source
const (
	TokenLifeSecs = 120
)

Variables

View Source
var Log = logging.GetLogger("signapi").WithField("pkg", "signapi")

Functions

This section is empty.

Types

type AuthenticatorListEntry

type AuthenticatorListEntry struct {
	Authenticator auth.Authenticator
	Default       bool
}

type SignAPI

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

func New

func New(
	authList []AuthenticatorListEntry,
	signer *keysigner.KeySignerService,
	tkey []byte,
	defaultlife time.Duration,
	maxlife time.Duration,
	caChallengeLife time.Duration,
) *SignAPI

func (*SignAPI) HandleAddKey

func (sa *SignAPI) HandleAddKey(c echo.Context) error

func (*SignAPI) HandleAuthCallback

func (sa *SignAPI) HandleAuthCallback(c echo.Context) error

func (*SignAPI) HandleAuthDiscover

func (sa *SignAPI) HandleAuthDiscover(c echo.Context) error

func (*SignAPI) HandleCaChallenge

func (sa *SignAPI) HandleCaChallenge(c echo.Context) error

func (*SignAPI) HandleGetKey

func (sa *SignAPI) HandleGetKey(c echo.Context) error

func (*SignAPI) HandleLogin

func (sa *SignAPI) HandleLogin(c echo.Context) error

func (*SignAPI) HandleReady

func (sa *SignAPI) HandleReady(c echo.Context) error

func (*SignAPI) HandleSign

func (sa *SignAPI) HandleSign(c echo.Context) error

func (*SignAPI) LoginUserPasswordAuthSkipper

func (sa *SignAPI) LoginUserPasswordAuthSkipper(c echo.Context) bool

func (*SignAPI) RegisterRoutes

func (sa *SignAPI) RegisterRoutes(g *echo.Group)

type SignClaim

type SignClaim struct {
	AuthContext *auth.AuthContext
	jwt.RegisteredClaims
}

Directories

Path Synopsis
Package objects contains types shared by the API server and client.
Package objects contains types shared by the API server and client.

Jump to

Keyboard shortcuts

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