proxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidRequest              = "Invalid request"
	ErrInternalServer              = "Internal server error"
	ErrInvalidLogout               = "Invalid logout request"
	ErrUnauthorized                = "Unauthorized"
	ErrBadRequest                  = "Bad request"
	ErrMethodNotAllowed            = "Method not allowed"
	ErrInvalidIDPID                = "Invalid IDP ID"
	ErrMissingSAMLRequest          = "Missing SAMLRequest parameter"
	ErrInvalidFormData             = "Invalid form data"
	ErrFailedToCreateLogoutRequest = "Failed to create logout request"
	ErrIDPDoesNotSupportSLO        = "Selected IdP does not support Single Logout"
)

Standard error responses.

Variables

This section is empty.

Functions

func DeleteSecureCookie

func DeleteSecureCookie(w http.ResponseWriter, r *http.Request, name string)

DeleteSecureCookie removes a cookie by setting its MaxAge to -1.

func SetSecureCookie

func SetSecureCookie(w http.ResponseWriter, r *http.Request, name, value string, maxAge int)

SetSecureCookie sets a secure HTTP-only cookie with consistent security settings.

func SetupHTTPHandlers

func SetupHTTPHandlers(idp *saml.IDP, providers *saml.ServiceProviders, cfg config.Config) http.Handler

SetupHTTPHandlers sets up the HTTP handlers for the SAML proxy. This proxy acts as a SAML Identity Provider (IdP) proxy: - To Service Providers (SPs), it appears as an IdP - To Identity Providers (IdPs), it appears as an SP It allows users to select which IdP they want to use for authentication.

func StartServer

func StartServer(cfg config.Config, handler http.Handler) error

StartServer starts the HTTP server with the given configuration and handler.

Types

type SelectionItem

type SelectionItem struct {
	ID          string
	Name        string
	HiddenField string
	Value       string
}

SelectionItem represents an item in a selection list.

type SelectionPageConfig

type SelectionPageConfig struct {
	Title       string
	Subtitle    string
	ActionURL   string
	ButtonClass string
	ItemClass   string
	Note        string
}

SelectionPageConfig holds configuration for selection page templates.

type SelectionPageData

type SelectionPageData struct {
	Config SelectionPageConfig
	Items  []SelectionItem
}

SelectionPageData holds data for selection page templates.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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