Documentation ¶
Overview ¶
Package wsfed provides functionality for generating a redirect url to an IDP, and parsing Tokens returned from the IDP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { IDPEndpoint string MetadataURL string MetadataCertsAreTrusted bool MetadataRefreshIntervalSeconds time.Duration Realm string TrustedCerts []x509.Certificate // contains filtered or unexported fields }
Config maintains the configuration for sending/receiving WSFed messages.
Either an IDPEndpoint or MetadataURL should be specified.
If MetadataURL is provided, it will be parsed for a PassiveRequestorEndpoint. The certificates in the metadata can optionally be added to the TrustedCerts, or the certs can be specified directly.
If MetadataRefreshIntervalSeconds is set, the metadata will be polled at that frequency to update the configuration. This is usefull for certificate rotation when the metadata certs are trusted (MetadataCertsAreTrusted).
func (*Config) AddTrustedCert ¶
func (c *Config) AddTrustedCert(cert x509.Certificate)
AddTrustedCert adds a cert to Config.TrustedCerts. If the cert already exists in the array, then no action is taken.
type RequestParameters ¶
type RequestParameters struct { Wa string Wtrealm string Wreply string Wctx string Wct string Wfresh string }
RequestParameters holds the paramter values for the WSFed GET/POST request
type SAMLv11 ¶
SAMLv11 is an implentation of the Token interface for SAML v1.1 tokens
type WSFed ¶
type WSFed struct {
// contains filtered or unexported fields
}
WSFed provides request and response handling for WS-Federation messages
func (*WSFed) GetDefaultRequestParameters ¶
func (w *WSFed) GetDefaultRequestParameters() RequestParameters
GetDefaultRequestParameters returns a RequestParameters object with wa set to "wsignin1.0" and Wtrealm set to the WSFed.config.Realm
func (*WSFed) GetRequestURL ¶
func (w *WSFed) GetRequestURL(params RequestParameters) (requestURL string, err error)
GetRequestURL constructs the url that the requestor can be sent to for authentication