Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateSAMLTimeExpiry ¶
CalculateSAMLTimeExpiry returns the time when a consumed SAML identifier (SAMLResponse or assertion) can be safely deleted, since by then any replay attempt would be rejected as expired. It uses whichever identifier's IssueInstant is most recent plus the allowed delay (crewjam's MaxIssueDelay).
Types ¶
type Client ¶
type Client struct{}
func (*Client) MakeAuthenticationRequest ¶
func (s *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 (s *Client) ParseResponse(serviceProvider saml.ServiceProvider, req *http.Request, possibleRequestIDs []string) (*ValidatedResponse, error)
ParseResponse wraps the parsing and validation of the IdP's SAMLResponse in req and returns the verified assertion together with the SAMLResponse's own details in a ValidatedResponse.
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) (*ValidatedResponse, error)
}
Service serves as a lightweight wrapper around the SAML package.