saml

package
Version: v2.2.0-preview....-d0dcff3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: CC0-1.0 Imports: 16 Imported by: 0

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

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

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL