Versions in this module Expand all Collapse all v0 v0.13.0 Sep 19, 2017 Changes in this version + const DefaultCacheDuration + const DefaultValidDuration + const HTTPPostBinding + const HTTPRedirectBinding + const MaxIssueDelay + var RandReader = rand.Reader + var StatusSuccess = "urn:oasis:names:tc:SAML:2.0:status:Success" + var TimeNow = func() time.Time + type Assertion struct + AttributeStatement *AttributeStatement + AuthnStatement *AuthnStatement + Conditions *Conditions + ID string + IssueInstant time.Time + Issuer *Issuer + Signature *xmlsec.Signature + Subject *Subject + Version string + XMLName xml.Name + func (a *Assertion) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type AssertionAttribute struct + FriendlyName string + Name string + Value string + type AssertionAttributes []AssertionAttribute + func (aa AssertionAttributes) Get(name string) *AssertionAttribute + type Attribute struct + FriendlyName string + Name string + NameFormat string + Values []AttributeValue + type AttributeStatement struct + Attributes []Attribute + type AttributeValue struct + NameID *NameID + Type string + Value string + type Audience struct + Value string + type AudienceRestriction struct + Audience *Audience + type AuthnContext struct + AuthnContextClassRef *AuthnContextClassRef + type AuthnContextClassRef struct + Value string + type AuthnRequest struct + AssertionConsumerServiceURL string + Destination string + ID string + IssueInstant time.Time + Issuer Issuer + NameIDPolicy NameIDPolicy + ProtocolBinding string + Signature *xmlsec.Signature + Version string + XMLName xml.Name + func (a *AuthnRequest) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (req *AuthnRequest) Post(relayState string) []byte + func (req *AuthnRequest) Redirect(relayState string) *url.URL + type AuthnStatement struct + AuthnContext AuthnContext + AuthnInstant time.Time + SessionIndex string + SessionNotOnOrAfter time.Time + SubjectLocality SubjectLocality + func (a *AuthnStatement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type Conditions struct + AudienceRestriction *AudienceRestriction + NotBefore time.Time + NotOnOrAfter time.Time + func (c *Conditions) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type EncryptedAssertion struct + Assertion *Assertion + EncryptedData []byte + type EncryptionMethod struct + Algorithm string + type Endpoint struct + Binding string + Location string + ResponseLocation string + type EntitiesDescriptor struct + EntityDescriptor []*Metadata + XMLName xml.Name + type IDPSSODescriptor struct + KeyDescriptor []KeyDescriptor + NameIDFormat []string + ProtocolSupportEnumeration string + SingleSignOnService []Endpoint + XMLName xml.Name + type IdentityProvider struct + Certificate string + Key string + MetadataURL string + SSOURL string + ServiceProviders map[string]*Metadata + SessionProvider SessionProvider + func (idp *IdentityProvider) Handler() http.Handler + func (idp *IdentityProvider) Metadata() *Metadata + func (idp *IdentityProvider) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (idp *IdentityProvider) ServeIDPInitiated(w http.ResponseWriter, r *http.Request, serviceProviderID string, ...) + func (idp *IdentityProvider) ServeMetadata(w http.ResponseWriter, r *http.Request) + func (idp *IdentityProvider) ServeSSO(w http.ResponseWriter, r *http.Request) + type IdpAuthnRequest struct + ACSEndpoint *IndexedEndpoint + Assertion *Assertion + AssertionBuffer []byte + HTTPRequest *http.Request + IDP *IdentityProvider + RelayState string + Request AuthnRequest + RequestBuffer []byte + Response *Response + ServiceProviderMetadata *Metadata + func NewIdpAuthnRequest(idp *IdentityProvider, r *http.Request) (*IdpAuthnRequest, error) + func (req *IdpAuthnRequest) MakeAssertion(session *Session) error + func (req *IdpAuthnRequest) MakeResponse() error + func (req *IdpAuthnRequest) MarshalAssertion() error + func (req *IdpAuthnRequest) Validate() error + func (req *IdpAuthnRequest) WriteResponse(w http.ResponseWriter) error + type IndexedEndpoint struct + Binding string + Index int + Location string + type InvalidResponseError struct + Now time.Time + PrivateErr error + Response string + func (ivr *InvalidResponseError) Error() string + type Issuer struct + Format string + Value string + XMLName xml.Name + type KeyDescriptor struct + EncryptionMethods []EncryptionMethod + KeyInfo KeyInfo + Use string + type KeyInfo struct + Certificate string + XMLName xml.Name + type Metadata struct + CacheDuration time.Duration + EntityID string + IDPSSODescriptor *IDPSSODescriptor + SPSSODescriptor *SPSSODescriptor + ValidUntil time.Time + XMLName xml.Name + func (m *Metadata) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type NameID struct + Format string + NameQualifier string + SPNameQualifier string + Value string + type NameIDPolicy struct + AllowCreate bool + Format string + XMLName xml.Name + type RelaxedTime time.Time + func (m *RelaxedTime) UnmarshalText(text []byte) error + type Response struct + Assertion *Assertion + Destination string + EncryptedAssertion *EncryptedAssertion + ID string + InResponseTo string + IssueInstant time.Time + Issuer *Issuer + Status *Status + Version string + XMLName xml.Name + func (r *Response) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type SPSSODescriptor struct + ArtifactResolutionService []IndexedEndpoint + AssertionConsumerService []IndexedEndpoint + AttributeConsumingService []interface{} + AuthnRequestsSigned bool + KeyDescriptor []KeyDescriptor + ManageNameIDService []Endpoint + NameIDFormat []string + ProtocolSupportEnumeration string + SingleLogoutService []Endpoint + WantAssertionsSigned bool + XMLName xml.Name + type ServiceProvider struct + AcsURL string + Certificate string + IDPMetadata *Metadata + Key string + MetadataURL string + func (sp *ServiceProvider) GetSSOBindingLocation(binding string) string + func (sp *ServiceProvider) InitiateLogin(w http.ResponseWriter) error + func (sp *ServiceProvider) MakeAuthenticationRequest(idpURL string) (*AuthnRequest, error) + func (sp *ServiceProvider) MakePostAuthenticationRequest(relayState string) ([]byte, error) + func (sp *ServiceProvider) MakeRedirectAuthenticationRequest(relayState string) (*url.URL, error) + func (sp *ServiceProvider) Metadata() *Metadata + func (sp *ServiceProvider) Parse(w http.ResponseWriter, r *http.Request) (*Assertion, error) + func (sp *ServiceProvider) ParseResponse(req *http.Request, possibleRequestIDs []string) (*Assertion, error) + func (sp *ServiceProvider) ParseSAMLResponse(samlResponse string, possibleRequestIDs []string) (*Assertion, error) + type Session struct + CreateTime time.Time + ExpireTime time.Time + Groups []string + ID string + Index string + NameID string + UserCommonName string + UserEmail string + UserGivenName string + UserName string + UserSurname string + type SessionProvider interface + GetSession func(w http.ResponseWriter, r *http.Request, req *IdpAuthnRequest) *Session + type Status struct + StatusCode StatusCode + XMLName xml.Name + type StatusCode struct + Value string + XMLName xml.Name + type Subject struct + NameID *NameID + SubjectConfirmation *SubjectConfirmation + XMLName xml.Name + type SubjectConfirmation struct + Method string + SubjectConfirmationData SubjectConfirmationData + type SubjectConfirmationData struct + Address string + InResponseTo string + NotOnOrAfter time.Time + Recipient string + func (s *SubjectConfirmationData) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type SubjectLocality struct + Address string