saml

package
v2.2.0-preview.5.4+inc... Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: CC0-1.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSamlTestResponse

func CreateSamlTestResponse(t *testing.T, conf TestResponseConfig) string

CreateSamlTestResponse crafts a SAML response, mimicing a response from WSO2

Types

type Service

type Service struct {
	Log api.LogService
	Env api.Settings
	// contains filtered or unexported fields
}

Service implements the handling of SAMl requests and responses.

func (*Service) CreateAuthenticationRequest

func (service *Service) CreateAuthenticationRequest() (string, string, error)

CreateAuthenticationRequest creates a SAML 2.0 authentication request based on the service provider settings. If configured to sign the request then the Base64 XML will be signed.

func (*Service) CreateSLORequest added in v1.0.6

func (service *Service) CreateSLORequest(username string, sessionIndex string) (string, string, error)

CreateSLORequest creates an encoded SAML Logout Request suitable for sending to the identity server

func (*Service) ResponseType added in v1.0.6

func (service *Service) ResponseType(encoded string) (api.SAMLResponseType, error)

ResponseType returns an "enum" that indicates what type of response the encoded message represents

func (*Service) ValidateAuthenticationResponse

func (service *Service) ValidateAuthenticationResponse(encoded string) (string, string, error)

ValidateAuthenticationResponse validations a SAML authentication response.

type TestResponseConfig

type TestResponseConfig struct {
	SigningCert    string
	SigningKey     string
	IDPIssuerURL   string
	SSODescription string
	CallbackURL    string
}

TestResponseConfig is way to configure CreateSamlTestResponse

Jump to

Keyboard shortcuts

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