Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct{}
func (*Client) MakeAuthenticationRequest ¶
func (c *Client) MakeAuthenticationRequest(serviceProvider saml.ServiceProvider, idpURL string, binding string, resultBinding string) (*saml.AuthnRequest, error)
MakeAuthenticationRequest abstracts creating an SAML authentication request using the HTTP-Redirect binding. It returns a URL that we will redirect the user to in order to start the auth process.
func (*Client) ParseResponse ¶
func (c *Client) ParseResponse(serviceProvider saml.ServiceProvider, req *http.Request, possibleRequestIDs []string) (*saml.Assertion, error)
ParseResponse abstracts the handling/validation of the IDP response. The purpose is to extract the SAML IDP response received in req, resolves artifacts when necessary, validates it, and returns the verified assertion.
type Service ¶
type Service interface {
MakeAuthenticationRequest(serviceProvider saml.ServiceProvider, idpURL string, binding string, resultBinding string) (*saml.AuthnRequest, error)
ParseResponse(serviceProvider saml.ServiceProvider, req *http.Request, possibleRequestIDs []string) (*saml.Assertion, error)
}
Service serves as a lightweight wrapper around the SAML package.