Versions in this module Expand all Collapse all v0 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + const HttpParamRelayState + const HttpParamSAMLEncoding + const HttpParamSAMLRequest + const HttpParamSAMLResponse + const HttpParamSigAlg + const HttpParamSignature + const SAMLEncodingDeflate + var ErrorXMLNotSigned = errors.New("XML document is not signed") + func FetchMetadata(ctx context.Context, httpClient *http.Client, metadataURL *url.URL) (*saml.EntityDescriptor, []byte, error) + func FindChild(parentEl *etree.Element, childNS string, childTag string) (*etree.Element, error) + func ParseMetadataFromFile(fileLocation string) (*saml.EntityDescriptor, []byte, error) + func ParseMetadataFromXml(xml string) (*saml.EntityDescriptor, []byte, error) + func ResolveMetadata(ctx context.Context, metadataSource string, opts ...MetadataResolverOptions) (*saml.EntityDescriptor, []byte, error) + func VerifySignature(opts ...SignatureVerifyOptions) error + func WritePostBindingHTML(formHtml []byte, rw http.ResponseWriter) error + type FixedAuthnRequest struct + func NewFixedAuthenticationRequest(sp *saml.ServiceProvider, idpURL string, binding string, resultBinding string) (*FixedAuthnRequest, error) + func (req *FixedAuthnRequest) Redirect(relayState string, sp *saml.ServiceProvider) (*url.URL, error) + type FixedLogoutRequest struct + func NewFixedLogoutRequest(sp *saml.ServiceProvider, idpURL, nameID string) (*FixedLogoutRequest, error) + func (req *FixedLogoutRequest) Redirect(relayState string, sp *saml.ServiceProvider) (*url.URL, error) + type MetadataResolverOption struct + HttpClient *http.Client + type MetadataResolverOptions func(opt *MetadataResolverOption) + func WithHttpClient(client *http.Client) MetadataResolverOptions + type ParsableSamlTypes interface + type SAMLObjectParseResult struct + Binding string + Decoded []byte + Encoded string + Err error + func ParseSAMLObject[T ParsableSamlTypes](gc *gin.Context, dest *T) (ret SAMLObjectParseResult) + type SignatureContext struct + Binding string + Certs []*x509.Certificate + Request *http.Request + XMLData []byte + type SignatureVerifyOptions func(sc *SignatureContext) + func MetadataSignature(data []byte, certs ...*x509.Certificate) SignatureVerifyOptions