samlsimulator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceProviderProvider

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

ServiceProviderProvider is a simple saml.ServiceProviderProvider that will use an existing SAML request to reverse-engineer a valid service provider.

func (*ServiceProviderProvider) GetServiceProvider

func (s *ServiceProviderProvider) GetServiceProvider(r *http.Request, serviceProviderID string) (*saml.EntityDescriptor, error)

GetServiceProvider returns the Service Provider metadata for the service provider ID, which is typically the service provider's metadata URL. If an appropriate service provider cannot be found then the returned error must be os.ErrNotExist.

This cheats by using the SAML request to reverse-engineer some valid metadata that exactly matches what was provided.

Please ensure that your call SetRequest before using this.

func (*ServiceProviderProvider) SetRequest

func (s *ServiceProviderProvider) SetRequest(req *saml.IdpAuthnRequest)

SetRequest sets the SAML request to use to reverse-engineer the metadata.

If this is not set, then GetServiceProvider will fail.

type Simulator

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

func New

func New() (*Simulator, error)

func (*Simulator) ServeHTTP

func (s *Simulator) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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