Versions in this module Expand all Collapse all v1 v1.10.0 Jan 19, 2024 Changes in this version + const BINDING_HTTP_POST + const BINDING_HTTP_REDIRECT + const DEFAULT_HTML_TEMPLATE + const HTML_SAML_FORM_TOKEN + const KEY_USE_ENCRYPTION + const KEY_USE_SIGNING + const NAME_ID_FORMAT_EMAIL + const NAME_ID_FORMAT_ENTITY + const NAME_ID_FORMAT_KERBEROS + const NAME_ID_FORMAT_PERSISTENT + const NAME_ID_FORMAT_TRANSIENT + const NAME_ID_FORMAT_UNSPEC + const NAME_ID_FORMAT_WINDOWS + const NAME_ID_FORMAT_X509 + const PROTOCOL_SAML2 + const SAML2_VERSION + const STATUS_SUCCESS + const XMLNS_ASSERT + const XMLNS_DS + const XMLNS_MD + const XMLNS_PROTO + var NAME_ID_FORMATS = []string + func GenerateSAMLId() string + func SAMLDecode(input string) ([]byte, error) + func SAMLEncode(input []byte) (string, error) + func SAMLForm(action string, attrs map[string]string) string + func SignXML(xmlstr string, privateKey *rsa.PrivateKey) (string, error) + func ValidateXML(signed string) ([]string, error) + type Assertion struct + AttributeStatement *AttributeStatement + AuthnStatement AuthnStatement + Conditions Conditions + ID string + IssueInstant string + Issuer Issuer + Signature *Signature + Subject Subject + Version string + XMLName xml.Name + type Attribute struct + AttributeValues []AttributeValue + FriendlyName *string + Name string + NameFormat *string + XMLName xml.Name + type AttributeConsumingService struct + Index string + RequestedAttributes []RequestedAttribute + ServiceName SXMLText + XMLName xml.Name + type AttributeStatement struct + Attributes []Attribute + XMLName xml.Name + type AttributeValue struct + Type string + Value string + XMLName xml.Name + type Audience struct + Value string + XMLName xml.Name + type AudienceRestriction struct + Audience Audience + XMLName xml.Name + type AuthnContext struct + AuthnContextClassRef AuthnContextClassRef + XMLName xml.Name + type AuthnContextClassRef struct + Value string + XMLName xml.Name + type AuthnRequest struct + AssertionConsumerServiceURL string + Destination string + ForceAuthn string + ID string + IsPassive string + IssueInstant string + Issuer Issuer + NameIDPolicy NameIDPolicy + ProtocolBinding string + Version string + XMLName xml.Name + func NewRequest(input SSAMLRequestInput) AuthnRequest + type AuthnStatement struct + AuthnContext AuthnContext + AuthnInstant string + SessionIndex string + SubjectLocality *SubjectLocality + XMLName xml.Name + type CipherData struct + CipherValue CipherValue + XMLName xml.Name + type CipherValue struct + Value string + XMLName xml.Name + type Conditions struct + AudienceRestrictions []AudienceRestriction + NotBefore *string + NotOnOrAfter string + XMLName xml.Name + type DigestMethod struct + Algorithm string + XMLName xml.Name + type EncryptedAssertion struct + EncryptedData EncryptedData + XMLName xml.Name + type EncryptedData struct + CipherData CipherData + EncryptionMethod EncryptionMethod + Id string + KeyInfo KeyInfo + Type string + XMLName xml.Name + type EncryptedKey struct + CipherData CipherData + EncryptionMethod EncryptionMethod + Id string + KeyInfo KeyInfo + Recipient string + XMLName xml.Name + type EncryptionMethod struct + Algorithm string + DigestMethod *DigestMethod + XMLName xml.Name + type EntityDescriptor struct + EntityId string + Extensions *Extensions + IDPSSODescriptor *SSODescriptor + Organization *Organization + SPSSODescriptor *SSODescriptor + Signature *Signature + XMLName xml.Name + func NewIdpMetadata(input SSAMLIdpMetadataInput) EntityDescriptor + func NewSpMetadata(input SSAMLSpMetadataInput) EntityDescriptor + func ParseMetadata(data []byte) (EntityDescriptor, error) + func (ed EntityDescriptor) String() string + type Extensions struct + DigestMethods []DigestMethod + RequestInitiator *RequestInitiator + Scope *SSAMLScope + SigningMethods []SigningMethod + UIInfo *SSAMLUIInfo + XMLName xml.Name + type Issuer struct + Format *string + Issuer string + XMLName xml.Name + type KeyDescriptor struct + EncryptionMethods []EncryptionMethod + KeyInfo KeyInfo + Use string + XMLName xml.Name + type KeyInfo struct + EncryptedKey *EncryptedKey + X509Data *X509Data + XMLName xml.Name + type NameID struct + Format string + NameQualifier *string + Value string + XMLName xml.Name + type NameIDPolicy struct + AllowCreate string + Format string + SPNameQualifier *string + XMLName xml.Name + type Organization struct + OrganizationDisplayName SXMLText + OrganizationName SXMLText + OrganizationURL SXMLText + XMLName xml.Name + type Reference struct + DigestMethod EncryptionMethod + DigestValue SSAMLValue + Transforms Transforms + URI string + XMLName xml.Name + type RequestInitiator struct + Binding string + Location string + XMLName xml.Name + type RequestedAttribute struct + FriendlyName string + IsRequired string + Name string + XMLName xml.Name + type Response struct + Assertion *Assertion + Destination string + EncryptedAssertion *EncryptedAssertion + ID string + InResponseTo *string + IssueInstant string + Issuer Issuer + Status Status + Version string + XMLName xml.Name + func NewResponse(input SSAMLResponseInput) Response + func (r *Response) AddAttribute(name string, friendlyName string, nameFormat string, values []string) + func (r *Response) AddAudienceRestriction(value string) + func (samlResp Response) FetchAttribtues() map[string][]string + func (samlResp Response) IsSuccess() bool + type SIdpInitiatedLoginInput struct + EntityID string + IdpId string + RedirectUrl string + type SIdpRedirectLoginInput struct + RelayState string + SAMLRequest string + SigAlg string + Signature string + Username string + type SSAMLIdpInitiatedLoginData struct + RelayState string + type SSAMLIdpMetadataInput struct + CertString string + EntityId string + RedirectLoginUrl string + RedirectLogoutUrl string + type SSAMLInstance struct + func NewSAMLInstance(entityID string, cert, key string) (*SSAMLInstance, error) + func (saml *SSAMLInstance) GetCertString() string + func (saml *SSAMLInstance) GetEntityId() string + func (saml *SSAMLInstance) SetEntityId(id string) + func (saml *SSAMLInstance) SignXML(xmlstr string) (string, error) + func (saml *SSAMLInstance) UnmarshalResponse(xmlText []byte) (*Response, error) + type SSAMLNameIDFormat struct + Format string + XMLName xml.Name + type SSAMLRequestInput struct + AssertionConsumerServiceURL string + Destination string + EntityID string + RequestID string + type SSAMLResponseAttribute struct + FriendlyName string + Name string + NameFormat string + Values []string + type SSAMLResponseInput struct + AssertionConsumerServiceURL string + IssuerCertString string + IssuerEntityId string + RequestEntityId string + RequestID string + type SSAMLScope struct + Regexp string + Scope string + XMLName xml.Name + type SSAMLService struct + Binding string + Index *string + IsDefault *string + Location string + XMLName xml.Name + type SSAMLSpInitiatedLoginData struct + Attributes []SSAMLResponseAttribute + AudienceRestriction string + Form string + NameId string + NameIdFormat string + type SSAMLSpMetadataInput struct + AssertionConsumerUrl string + CertString string + EntityId string + RequestedAttributes []RequestedAttribute + ServiceName string + type SSAMLUIInfo struct + Description SXMLText + DisplayName SXMLText + Logo SXMLLogo + XMLName xml.Name + type SSAMLValue struct + Value string + XMLName xml.Name + type SSODescriptor struct + ArtifactResolutionServices []SSAMLService + AssertionConsumerServices []SSAMLService + AttributeConsumingServices []AttributeConsumingService + AuthnRequestsSigned *string + Extensions *Extensions + KeyDescriptors []KeyDescriptor + ManageNameIDServices []SSAMLService + NameIDFormat []SSAMLNameIDFormat + ProtocolSupportEnumeration string + SingleLogoutServices []SSAMLService + SingleSignOnServices []SSAMLService + WantAssertionsSigned *string + XMLName xml.Name + type SSpInitiatedLoginInput struct + EntityID string + type SXMLLogo struct + Height string + URL string + Width string + XMLName xml.Name + type SXMLText struct + Lang string + Text string + XMLName xml.Name + type Signature struct + KeyInfo KeyInfo + SignatureValue SSAMLValue + SignedInfo SignedInfo + XMLName xml.Name + type SignedInfo struct + CanonicalizationMethod EncryptionMethod + Reference Reference + SignatureMethod EncryptionMethod + XMLName xml.Name + type SigningMethod struct + Algorithm string + XMLName xml.Name + type Status struct + StatusCode StatusCode + StatusMessage *StatusMessage + XMLName xml.Name + type StatusCode struct + Value string + XMLName xml.Name + type StatusMessage struct + Message string + XMLName xml.Name + type Subject struct + NameID NameID + SubjectConfirmation SubjectConfirmation + XMLName xml.Name + type SubjectConfirmation struct + Method string + SubjectConfirmationData SubjectConfirmationData + XMLName xml.Name + type SubjectConfirmationData struct + InResponseTo *string + NotBefore *string + NotOnOrAfter string + Recipient string + XMLName xml.Name + type SubjectLocality struct + Address string + XMLName xml.Name + type Transforms struct + Transforms []EncryptionMethod + XMLName xml.Name + type X509Certificate struct + Cert string + XMLName xml.Name + type X509Data struct + X509Certificate X509Certificate + XMLName xml.Name