uiauth

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package uiauth provides first-party OpenID Connect sessions for simulator operator interfaces without changing any simulated cloud API route.

Index

Constants

View Source
const (
	LoginPath              = "/auth/oidc/login"
	CallbackPath           = "/auth/oidc/callback"
	SessionPath            = "/auth/session"
	FederationSubjectPath  = "/auth/federation-subject"
	LogoutPath             = "/auth/logout"
	FrontchannelLogoutPath = "/auth/oidc/frontchannel-logout"
	BackchannelLogoutPath  = "/auth/oidc/backchannel-logout"
	LogoutCompletePath     = "/auth/shauth/logout/complete"
	SignedOutPath          = "/auth/signed-out"
	ValidationPath         = "/auth/validation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func New

func New(config Config) (*Auth, error)

func (*Auth) Enabled

func (a *Auth) Enabled() bool

func (*Auth) OperatorAssertion

func (a *Auth) OperatorAssertion(r *http.Request) (assertion, issuer, audience string, ok bool)

OperatorAssertion returns the OpenID Connect ID token the signed-in operator authenticated with for the session bound to r, together with the identity coordinates it was issued under: the issuer that signed it and the audience (client ID) it was issued for. The console backend brokers this assertion into short-lived cloud credentials the way a real console federates a signed-in session; keeping it here means the raw assertion never leaves the server. It reports false when no operator session is present.

func (*Auth) Protect

func (a *Auth) Protect(next http.Handler) http.Handler

func (*Auth) Register

func (a *Auth) Register(mux *http.ServeMux)

type Config

type Config struct {
	Issuer          string
	ClientID        string
	ClientSecret    string
	PublicURL       string
	SessionSecret   string
	CookieName      string
	ApplicationName string
	ReleaseRevision string
	SessionLifetime time.Duration
	InsecureCookies bool
}

func (Config) Enabled

func (c Config) Enabled() bool

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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