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.