Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crewjam/saml
/ functions
Functions
2,436 in github.com/crewjam/saml
⨍
Functions
2,436
◇
Types & classes
281
↓ 8 callers
Function
idpErrValidRequest
idpErrValidRequest returns a validated IdpAuthnRequest from test.SP sent with the HTTP-Redirect binding.
idp_error_response_test.go:29
↓ 8 callers
Method
makeUnsignedLogoutRequest
(idpURL, nameID string, opts ...LogoutRequestOption)
service_provider.go:2870
↓ 8 callers
Function
newSimpleSignIDPTest
newSimpleSignIDPTest returns an IdP test whose SP signs requests, accepts SimpleSign and HTTP-POST at its ACS, and trusts the IdP's (expired) test cer
simplesign_idp_test.go:24
↓ 8 callers
Function
next
next returns the request the browser makes after receiving w: following a redirect or submitting an auto-submitting form.
identity_provider_logout_propagation_test.go:172
↓ 8 callers
Method
postSOAP
postSOAP sends body to the IdP's ServeSLO as a SOAP message, without any browser cookie.
identity_provider_logout_soap_request_test.go:64
↓ 8 callers
Method
responseDom
(t *testing.T)
service_provider_test.go:1103
↓ 8 callers
Method
signedResponse
signedResponse returns a Response (signed by the IDP) containing an unsigned assertion.
sp_coverage_parse_test.go:30
↓ 8 callers
Function
spcovSign
spcovSign returns el with an enveloped signature made by key, embedding cert in KeyInfo.
sp_coverage_helpers_test.go:94
↓ 8 callers
Function
specCoreIDPRequest
specCoreIDPRequest returns a validated IdpAuthnRequest from NewIdentityProviderTest, issued at 2015-12-01T01:57:09Z. It restores the globals NewIdenti
spec_core_assertions_test.go:42
↓ 8 callers
Function
specProfIDPTest
specProfIDPTest returns NewIdentityProviderTest(t, applyKey), restoring the package globals it replaces when the test ends.
spec_profiles_test.go:58
↓ 7 callers
Method
Consume
Consume implements saml.AssertionReplayCache.
samlsp/replay_cache.go:65
↓ 7 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:203
↓ 7 callers
Method
GetServiceProvider
GetServiceProvider returns the Service Provider metadata for the service provider ID, which is typically the service provider's metadata URL. If an ap
identity_provider.go:103
↓ 7 callers
Method
MakeSOAPLogoutRequest
MakeSOAPLogoutRequest returns a LogoutRequest for the principal nameID, addressed to the IdP's SingleLogoutService with the SAML SOAP binding, to send
service_provider_soap_logout.go:243
↓ 7 callers
Method
MatchesSession
MatchesSession reports whether session is one that the logout request asks to terminate: its NameID must be the request's NameID and, if the request c
identity_provider_logout.go:406
↓ 7 callers
Function
NewMemorySessionRevocationStore
NewMemorySessionRevocationStore returns a MemorySessionRevocationStore that holds at most maxEntries unexpired records. It panics if maxEntries is not
samlsp/session_revocation.go:298
↓ 7 callers
Function
PKCS1v15
PKCS1v15 returns a version of RSA that implements RSA in PKCS1v15 mode. By default the block cipher used is AES-256 CBC. The DigestMethod field is ign
xmlenc/pubkey.go:273
↓ 7 callers
Method
Public
()
samlsp/middleware_test.go:660
↓ 7 callers
Function
RegisterDecrypter
RegisterDecrypter registers the specified decrypter so that it can be used with Decrypt(), replacing any decrypter registered for the same algorithm.
xmlenc/xmlenc.go:57
↓ 7 callers
Method
ServeMetadata
ServeMetadata handles requests for the SAML metadata endpoint. If ServiceProvider.SignMetadata is set, the metadata is signed.
samlsp/middleware.go:136
↓ 7 callers
Method
SignLogoutRequest
SignLogoutRequest adds the `Signature` element to the `LogoutRequest`.
service_provider.go:2800
↓ 7 callers
Method
SignedMetadata
SignedMetadata returns the SP metadata as an XML element carrying an enveloped signature made with Key and Certificate (saml-metadata-2.0-os §3). It
service_provider.go:1031
↓ 7 callers
Method
ValidateSOAPLogoutRequest
ValidateSOAPLogoutRequest validates a LogoutRequest the IdP sent to the SingleLogoutService of this service provider with the SAML SOAP binding (back-
service_provider_soap_logout.go:47
↓ 7 callers
Function
WithSessionIndexes
WithSessionIndexes sets the SessionIndex elements of a LogoutRequest, one for each non-empty value, in order (saml-core-2.0-os section 3.7.1). Use it
service_provider.go:2842
↓ 7 callers
Function
aqKeyPair
aqKeyPair returns a new RSA key and a certificate for it that is valid at spcovNow.
service_provider_attribute_query_test.go:451
↓ 7 callers
Method
aqResponseEl
aqResponseEl returns the samlp:Response the attribute authority sends for query.
service_provider_attribute_query_test.go:86
↓ 7 callers
Function
checkEndpointLocation
checkEndpointLocation checks that location is a valid location for an endpoint with binding and returns it with surrounding whitespace removed, or ""
metadata.go:592
↓ 7 callers
Function
checkRelayState
checkRelayState refuses a RelayState longer than MaxRelayStateLength if limit is set (see ServiceProvider.LimitRelayStateLength and IdentityProvider.L
redirect_binding.go:349
↓ 7 callers
Function
checkSOAPEndpoint
checkSOAPEndpoint returns an error matching ErrInsecureSOAPEndpoint unless location is an https URL, or allowInsecure is set and it is an http URL.
soap.go:88
↓ 7 callers
Function
checkSigAlgNotSHA1
checkSigAlgNotSHA1 returns an error if reject is set and sigAlg, the SigAlg of an HTTP-Redirect or HTTP-POST-SimpleSign message, is based on SHA-1.
sha1_policy.go:29
↓ 7 callers
Function
checkVersion
checkVersion refuses a message or assertion whose Version is not 2.0 (saml-core §4.1.2 and §4.1.3.1: a relying party MUST NOT process an assertion, an
service_provider.go:2157
↓ 7 callers
Function
covPutUser
(t *testing.T, s *Server)
samlidp/session_coverage_test.go:27
↓ 7 callers
Function
encryptedNameID
encryptedNameID returns a saml:EncryptedID holding nameID, encrypted to the RSA key of cert.
logout_request_session_indexes_test.go:124
↓ 7 callers
Function
findOneChild
findOneChild finds the specified child element. Returns an error if the element doesn't exist.
service_provider.go:3764
↓ 7 callers
Method
getACSEndpoint
getACSEndpoint finds the AssertionConsumerService endpoint the response is sent to and sets SPSSODescriptor and ACSEndpoint. An endpoint named by Ass
identity_provider.go:1207
↓ 7 callers
Function
newSLOServerTest
newSLOServerTest returns a ServerTest whose SP has single logout set up, signs its messages with its own key, and is registered with the IdP.
samlidp/logout_test.go:28
↓ 7 callers
Method
postSOAP
postSOAP sends envelope to location with the SAML SOAP binding, using HTTPClient (see ServiceProvider.HTTPClient), and returns the body of the respons
service_provider_attribute_query.go:200
↓ 7 callers
Method
requests
()
identity_provider_logout_soap_test.go:160
↓ 7 callers
Function
schemacovSig
schemacovSig returns a fresh placeholder signature element.
schema_coverage_test.go:36
↓ 7 callers
Function
setNoCacheHeaders
setNoCacheHeaders sets the headers the SAML bindings ask of every HTTP message that carries a SAML message or artifact, so that neither the browser no
soap.go:121
↓ 7 callers
Method
setSessionIndexes
setSessionIndexes sets SessionIndex to the first of indexes and AdditionalSessionIndexes to the rest.
schema.go:190
↓ 7 callers
Function
spcovIDPMetadata
(cert *x509.Certificate)
sp_coverage_helpers_test.go:64
↓ 7 callers
Function
specProfAssertIssuer
specProfAssertIssuer checks the Issuer rule shared by saml-profiles §4.1.4.1, §4.1.4.2, §4.4.4.1, §4.4.4.2, §5.4.1 and §6.4.1: the Issuer is present,
spec_profiles_test.go:31
↓ 7 callers
Method
sso
sso sends an AuthnRequest with the given ForceAuthn and IsPassive attributes to /sso with the HTTP-Redirect binding, with cookie if it is not empty, a
samlidp/force_authn_passive_test.go:63
↓ 7 callers
Method
startLogout
(returnURL string)
identity_provider_logout_propagation_test.go:268
↓ 7 callers
Function
storedSessionIDs
(t *testing.T, s *Server)
samlidp/session_expiry_test.go:22
↓ 7 callers
Method
unsignedLogoutResponse
(t *testing.T)
redirect_binding_test.go:84
↓ 7 callers
Function
validateAuthnRequest
validateAuthnRequest parses and validates r as an AuthnRequest to test's IdP.
idp_review_authn_signature_test.go:27
↓ 7 callers
Method
validateLogoutResponse
validateLogoutResponse validates the LogoutResponse fields. Returns a nil error if the LogoutResponse is valid.
service_provider.go:3493
↓ 7 callers
Method
validateSignature
validateSignature returns nil iff the Signature embedded in the element is valid Every error other than errSignatureElementNotPresent matches ErrInva
service_provider.go:2609
↓ 7 callers
Method
verifySignedElement
verifySignedElement is validatedElement, trusting the certificates metadataCerts returns when the IdP's certificates come from its metadata (that is,
service_provider.go:2629
↓ 6 callers
Method
ClassRefs
ClassRefs returns the requested authentication context classes: the values of AuthnContextClassRefs if it is set, otherwise AuthnContextClassRef, if t
schema.go:43
↓ 6 callers
Method
GetNameID
()
samlsp/middleware_logout.go:15
↓ 6 callers
Method
GetSAMLNameID
GetSAMLNameID returns the NameID, or false if the session does not record it.
samlsp/session.go:30
↓ 6 callers
Function
GetSigningContext
GetSigningContext returns a dsig.SigningContext initialized based on the Service Provider's configuration
service_provider.go:1044
↓ 6 callers
Method
GetTrackedRequests
GetTrackedRequests returns all the pending tracked requests
samlsp/request_tracker.go:26
↓ 6 callers
Method
MakeArtifactResolveRequest
MakeArtifactResolveRequest produces a new ArtifactResolve object to send to the idp's Artifact resolver
service_provider.go:956
↓ 6 callers
Method
MakeErrorResponse
MakeErrorResponse sets ResponseEl to a signed SAML <Response> to the request with an error <Status> and no assertion: topLevel is the top-level status
identity_provider_error_response.go:69
↓ 6 callers
Method
PostBinding
PostBinding creates the HTTP POST form information for this `IdpAuthnRequest`. If `Response` is not already set, it calls MakeResponse to produce it.
identity_provider.go:1768
↓ 6 callers
Method
PostWithNonce
PostWithNonce is like Post, but if nonce is not empty it is set as the nonce attribute of the form's auto-submit <script> element, so that the form ca
service_provider.go:1205
↓ 6 callers
Method
Put
Put marshals `value` and stores it in `key`.
samlidp/memory_store.go:29
↓ 6 callers
Method
QueryAttributes
QueryAttributes asks the IdP's attribute authority for attributes of the user of the request's session, with ServiceProvider.QueryAttributes, and retu
samlsp/middleware_attribute_query.go:37
↓ 6 callers
Method
SaveForm
SaveForm implements FormReplayStore.
samlsp/form_replay.go:130
↓ 6 callers
Method
SendSOAPLogoutRequest
SendSOAPLogoutRequest sends req, made by MakeSOAPLogoutRequest, to its Destination with the SAML SOAP binding, using HTTPClient (see ServiceProvider.H
service_provider_soap_logout.go:293
↓ 6 callers
Method
ServeSLO
ServeSLO handles requests for the SAML SingleLogoutService endpoint, ServiceProvider.SloURL, using the HTTP-Redirect, HTTP-POST or HTTP-POST-SimpleSig
samlsp/middleware_logout.go:270
↓ 6 callers
Method
SignLogoutResponse
SignLogoutResponse adds the `Signature` element to the `LogoutResponse`.
service_provider.go:3252
↓ 6 callers
Method
StopTrackingRequest
StopTrackingRequest stops tracking the SAML request given by index, which is a string previously returned from TrackRequest
samlsp/request_tracker.go:23
↓ 6 callers
Method
UnmarshalText
UnmarshalText implements the encoding.TextUnmarshaler interface. Leading and trailing XML whitespace is ignored, as the xsd:duration type's whiteSpac
duration.go:75
↓ 6 callers
Method
WriteLogoutResponse
WriteLogoutResponse signs resp with the IdP's key and sends it to the browser using the binding of SLOEndpoint: with HTTP-Redirect, a redirect whose q
identity_provider_logout.go:459
↓ 6 callers
Method
aqAssertion
aqAssertion is what an attribute authority returns for query: a sender-vouches assertion about the queried subject, with no SubjectConfirmationData.
service_provider_attribute_query_test.go:57
↓ 6 callers
Function
cbcAssertionEncrypter
cbcAssertionEncrypter is the encrypter the IdP used by default before it chose the block cipher from the SP's metadata: RSA-OAEP-MGF1P with a SHA-1 di
identity_provider_assertion_encrypter_test.go:58
↓ 6 callers
Function
checkIssueInstant
checkIssueInstant refuses a message whose IssueInstant is more than MaxIssueDelay in the past, or more than MaxClockSkew in the future. A message date
service_provider.go:2329
↓ 6 callers
Method
checkNoErrors
(t *testing.T)
identity_provider_logout_soap_test.go:166
↓ 6 callers
Function
covCookieRequestTracker
--- request_tracker_cookie.go ---
samlsp/session_coverage_test.go:327
↓ 6 callers
Function
covNewMiddlewareTest
covNewMiddlewareTest wraps NewMiddlewareTest, restoring globals afterwards.
samlsp/samlsp_coverage_test.go:39
↓ 6 callers
Function
covTrackedRequestCodec
(t *testing.T)
samlsp/session_coverage_test.go:24
↓ 6 callers
Function
encryptedData
encryptedData builds an EncryptedData element for algorithm whose CipherValue holds n zero bytes. Anyone holding the service provider's public key can
xmlenc/short_ciphertext_test.go:18
↓ 6 callers
Method
encryptedID
encryptedID returns nameID encrypted to the SP.
encrypted_id_test.go:48
↓ 6 callers
Function
getCiphertext
(encryptedKey *etree.Element)
xmlenc/decrypt.go:96
↓ 6 callers
Function
logoutTrackingCookie
logoutTrackingCookie returns the logout request tracking cookie set by resp.
samlsp/middleware_logout_test.go:163
↓ 6 callers
Function
marshalMetadataDoc
marshalMetadataDoc marshals v and parses it with etree, for checks on the XML a consumer actually sees.
spec_metadata_test.go:41
↓ 6 callers
Function
marshalRoleDescriptorAttrs
marshalRoleDescriptorAttrs and unmarshalRoleDescriptorAttrs convert the RoleDescriptor attributes whose XML representation differs from the default en
metadata.go:412
↓ 6 callers
Function
newExistingSessionIDPTest
(t *testing.T)
identity_provider_response_writer_test.go:21
↓ 6 callers
Function
newPropagationServerTest
(t *testing.T)
samlidp/logout_propagation_test.go:28
↓ 6 callers
Function
newSignedAuthnRequestTest
newSignedAuthnRequestTest returns an IdP test whose SP signs its AuthnRequests with RSA-SHA256, so that its metadata says AuthnRequestsSigned="true" a
idp_review_authn_signature_test.go:19
↓ 6 callers
Function
next
next returns the request the browser makes after w.
samlidp/logout_propagation_test.go:70
↓ 6 callers
Method
now
now returns the current time from the Clock of s.IDP or, if it is nil, from the deprecated saml.TimeNow.
samlidp/session.go:22
↓ 6 callers
Function
parseCert
(x509Data string)
service_provider.go:908
↓ 6 callers
Function
parseRedirectBindingQuery
parseRedirectBindingQuery parses rawQuery as an HTTP-Redirect binding message whose protocol message is carried in messageParam (SAMLRequest or SAMLRe
redirect_binding.go:81
↓ 6 callers
Method
postRequest
postRequest returns an HTTP request carrying req with the HTTP-POST binding. req is sent as is: sign it first to send a signed request.
identity_provider_logout_test.go:119
↓ 6 callers
Function
putService
putService sends metadata to PUT /services/sp and returns the status code.
samlidp/signed_sp_metadata_test.go:48
↓ 6 callers
Function
reqSubjCheckRefused
reqSubjCheckRefused checks that the IdP answered with an error Response with no assertion and the given status codes.
idp_request_subject_test.go:77
↓ 6 callers
Method
signedLogoutResponse
--- logout responses ---
sp_coverage_parse_test.go:609
↓ 6 callers
Function
soapLogoutResponseBody
soapLogoutResponseBody returns a SOAP envelope holding a LogoutResponse from sp to requestID with status and no Destination, signed by sp unless sp ha
identity_provider_logout_soap_test.go:142
↓ 6 callers
Function
spSigningCerts
spSigningCerts returns the signing certificates in the SPSSODescriptors of a service provider's metadata: those of key descriptors whose use is "signi
simplesign_idp.go:57
↓ 6 callers
Function
spcovDeflate
(t *testing.T, buf []byte)
sp_coverage_helpers_test.go:193
↓ 6 callers
Function
specProfAuthnRequest
specProfAuthnRequest returns an IdpAuthnRequest for an AuthnRequest from test.SP with the given extra XML attributes on the AuthnRequest element.
spec_profiles_test.go:69
↓ 6 callers
Function
specProfParse
specProfParse parses a Response whose single (unsigned) assertion is built from e.assertion() and the Response from e.response(), after applying the m
spec_profiles_test.go:42
↓ 6 callers
Method
sso
sso logs the browser's session in to sp with SP-initiated SSO.
samlidp/logout_propagation_test.go:56
↓ 6 callers
Function
unmarshalRoleDescriptorAttrs
(m *RoleDescriptor, validUntil *RelaxedTime, cacheDuration Duration)
metadata.go:421
← previous
next →
201–300 of 2,436, ranked by callers