saml

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSamlRoutes

func CreateSamlRoutes(e *echo.Echo, sessionManager session.Manager, auditLogger auditlog.Logger, samlService Service)

func GenerateState

func GenerateState(config *config.Config, persister persistence.SamlStatePersister, provider string, redirectTo string, options ...func(*State)) ([]byte, error)

func GenerateStateForFlowAPI

func GenerateStateForFlowAPI(isFlow bool) func(*State)

Types

type Handler

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

func NewSamlHandler

func NewSamlHandler(sessionManager session.Manager, auditLogger auditlog.Logger, samlService Service) *Handler

func (*Handler) Auth

func (handler *Handler) Auth(c echo.Context) error

func (*Handler) CallbackPost

func (handler *Handler) CallbackPost(c echo.Context) error

func (*Handler) GetProvider

func (handler *Handler) GetProvider(c echo.Context) error

func (*Handler) Metadata

func (handler *Handler) Metadata(c echo.Context) error

type Service

type Service interface {
	Config() *config.Config
	Persister() persistence.Persister
	Providers() []provider.ServiceProvider
	GetProviderByDomain(domain string) (provider.ServiceProvider, error)
	GetProviderByIssuer(issuer string) (provider.ServiceProvider, error)
	GetAuthUrl(provider provider.ServiceProvider, redirectTo string, isFlow bool) (string, error)
}

func NewSamlService

func NewSamlService(cfg *config.Config, persister persistence.Persister) Service

type State

type State struct {
	Provider   string    `json:"provider"`
	RedirectTo string    `json:"redirect_to"`
	IssuedAt   time.Time `json:"issued_at"`
	ExpiresAt  time.Time `json:"expires_at"`
	Nonce      string    `json:"nonce"`
	IsFlow     bool      `json:"is_flow"`
}

func VerifyState

func VerifyState(config *config.Config, persister persistence.SamlStatePersister, state string) (*State, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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