samlprovider

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: GPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package samlprovider is the domain model for per-tenant SAML 2.0 Service Provider configuration (RFC-009 Phase 9d/9e).

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("saml provider not configured")

ErrNotFound is returned when a tenant has no SAML config.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	GetByTenant(ctx context.Context, tenantID shared.ID) (*SAMLProvider, error)
	Upsert(ctx context.Context, p *SAMLProvider) error
	Delete(ctx context.Context, tenantID shared.ID) error
}

Repository persists per-tenant SAML config.

type SAMLProvider

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

SAMLProvider is a tenant's SAML SP configuration (IdP side + policy).

func New

func New(id, tenantID shared.ID, idpEntityID, idpSSOURL, idpCert string) *SAMLProvider

New creates a SAML provider config (disabled-state controlled by Enabled).

func Reconstruct

func Reconstruct(id, tenantID shared.ID, idpEntityID, idpSSOURL, idpCert string, allowedDomains []string, defaultRole string, autoProvision, enabled bool, createdAt, updatedAt time.Time) *SAMLProvider

Reconstruct rebuilds from persistence.

func (*SAMLProvider) AllowedDomains

func (p *SAMLProvider) AllowedDomains() []string

func (*SAMLProvider) AutoProvision

func (p *SAMLProvider) AutoProvision() bool

func (*SAMLProvider) CreatedAt

func (p *SAMLProvider) CreatedAt() time.Time

func (*SAMLProvider) DefaultRole

func (p *SAMLProvider) DefaultRole() string

func (*SAMLProvider) Enabled

func (p *SAMLProvider) Enabled() bool

func (*SAMLProvider) ID

func (p *SAMLProvider) ID() shared.ID

func (*SAMLProvider) IDPCertificate

func (p *SAMLProvider) IDPCertificate() string

func (*SAMLProvider) IDPEntityID

func (p *SAMLProvider) IDPEntityID() string

func (*SAMLProvider) IDPSSOURL

func (p *SAMLProvider) IDPSSOURL() string

func (*SAMLProvider) IsDomainAllowed

func (p *SAMLProvider) IsDomainAllowed(emailDomain string) bool

IsDomainAllowed mirrors the SSO allow-list: empty list = any domain.

func (*SAMLProvider) SetAllowedDomains

func (p *SAMLProvider) SetAllowedDomains(d []string)

func (*SAMLProvider) SetAutoProvision

func (p *SAMLProvider) SetAutoProvision(b bool)

func (*SAMLProvider) SetDefaultRole

func (p *SAMLProvider) SetDefaultRole(r string)

func (*SAMLProvider) SetEnabled

func (p *SAMLProvider) SetEnabled(b bool)

func (*SAMLProvider) TenantID

func (p *SAMLProvider) TenantID() shared.ID

func (*SAMLProvider) UpdatedAt

func (p *SAMLProvider) UpdatedAt() time.Time

Jump to

Keyboard shortcuts

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