sp

package
v0.0.0-...-7eaf79b Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactCallback

type ArtifactCallback func(w http.ResponseWriter, r *http.Request, state []byte, assertion *saml.Assertion)

ArtifactCallback is called by the service provider following success retrieval of a SAML assertion

type Configuration

type Configuration struct {
	EntityID                    string
	AssertionConsumerServiceURL string
	IDPRedirectEndpoint         string
	IDPArtifactEndpoint         string
	IDPQueryEndpoint            string
	// Optional override of client added for testing
	// but may have other uses
	Client          *http.Client
	Timeout         time.Duration
	TLSConfig       *tls.Config
	Cache           store.Cache
	TimestampMargin time.Duration
}

Configuration holds the service provider's configuration

type ServiceProvider

type ServiceProvider interface {
	Query(nameID string) (*saml.Assertion, error)
	GetRedirect([]byte) (string, error)
	MetadataFunc() (http.HandlerFunc, error)
	ArtifactFunc(callback ArtifactCallback) http.HandlerFunc
}

ServiceProvider acts as a SAML service provider

func New

func New(conf Configuration) (ServiceProvider, error)

New creates a service provider from the provided configuration

Jump to

Keyboard shortcuts

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