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
Function
TestSessionExpiryOrder
Sessions are deleted in the order they fall due, and the timer is armed for the earliest deadline each time.
samlidp/session_expiry_test.go:94
Function
TestSessionExpiryReschedulesExtendedSession
A session whose ExpireTime moved later is scheduled again for its new deadline instead of being deleted.
samlidp/session_expiry_test.go:145
Function
TestSessionExpirySeedsStoredSessions
Sessions already in the Store when the server first schedules a deletion are scheduled too, and one already due arms the timer to fire at once.
samlidp/session_expiry_test.go:119
Function
TestSessionExpirySkipsDeletedSession
A session deleted before it falls due is skipped.
samlidp/session_expiry_test.go:132
Function
TestSessionKeyFallsBackToKey
(t *testing.T)
samlsp/session_key_test.go:28
Function
TestSessionKeySignsSessionsAndTrackedRequests
(t *testing.T)
samlsp/session_key_test.go:45
Function
TestSessionParticipantsLegacyList
Participants stored by an older version, as one list per session, are still read alongside new ones, and deleted with the session.
samlidp/session_participants_race_test.go:54
Function
TestSessionsCrud
(t *testing.T)
samlidp/session_test.go:13
Function
TestShortcut
(t *testing.T)
samlidp/shortcut_test.go:55
Function
TestShortcutsCrud
(t *testing.T)
samlidp/shortcut_test.go:13
Function
TestSignTokenRejectsMismatchedKeys
(t *testing.T)
samlsp/jwt_signer_test.go:18
Function
TestSignTokenRejectsNilKey
(t *testing.T)
samlsp/jwt_signer_test.go:47
Function
TestSignatureReferenceProfile_IDPLogoutRequest
The IdP's IdpLogoutRequest.Validate, for a LogoutRequest sent by the SP with the HTTP-POST binding.
signature_reference_profile_test.go:109
Function
TestSignatureReferenceProfile_SPAssertion
(t *testing.T)
signature_reference_profile_test.go:68
Function
TestSignatureReferenceProfile_SPLogoutRequest
The SP's ValidateLogoutRequest, for a LogoutRequest sent by the IdP with the HTTP-POST binding.
signature_reference_profile_test.go:95
Function
TestSignatureReferenceProfile_SPResponse
(t *testing.T)
signature_reference_profile_test.go:79
Function
TestSignatureReferenceProfile_VerifyMetadataSignature
(t *testing.T)
signature_reference_profile_test.go:135
Function
TestSignedMetadataStillVerifiesAfterRoundTrip
(t *testing.T)
metadata_signature_test.go:143
Function
TestSimpleSignDecodesLineWrappedSpecExample
The example form values in sstc-saml-binding-simplesign-cs-01 section 2.11 are line wrapped; they must still decode.
simplesign_binding_test.go:130
Function
TestSimpleSignIDPChoosesACSEndpoint
(t *testing.T)
simplesign_idp_test.go:204
Function
TestSimpleSignIDPInitiated
(t *testing.T)
simplesign_idp_test.go:301
Function
TestSimpleSignIDPMetadata
(t *testing.T)
simplesign_idp_test.go:327
Function
TestSimpleSignIDPRejectsBadRequests
(t *testing.T)
simplesign_idp_test.go:125
Function
TestSimpleSignIDPResponseWriting
(t *testing.T)
simplesign_idp_test.go:248
Function
TestSimpleSignKnownAnswer
TestSimpleSignKnownAnswer pins the whole signing path: RSA PKCS#1 v1.5 is deterministic, so the Signature for a fixed message, relay state and key nev
simplesign_binding_test.go:104
Function
TestSimpleSignLogoutValidation
(t *testing.T)
simplesign_binding_test.go:489
Function
TestSimpleSignMessageWithoutRootElement
(t *testing.T)
no_root_test.go:21
Function
TestSimpleSignOutgoing
(t *testing.T)
simplesign_binding_test.go:548
Function
TestSimpleSignResponseAtACS
(t *testing.T)
simplesign_binding_test.go:174
Function
TestSimpleSignSPMetadata
(t *testing.T)
simplesign_binding_test.go:656
Function
TestSimpleSignSSORoundTrip
(t *testing.T)
simplesign_idp_test.go:61
Function
TestSimpleSignSSORoundTripWithoutRelayState
(t *testing.T)
simplesign_idp_test.go:101
Function
TestSimpleSignSignedContent
(t *testing.T)
simplesign_binding_test.go:82
Function
TestSpcovAssertionAttributesGet
(t *testing.T)
sp_coverage_test.go:35
Function
TestSpcovAuthnRequestRedirect
(t *testing.T)
sp_coverage_test.go:117
Function
TestSpcovBindingLocationsMissing
(t *testing.T)
sp_coverage_test.go:101
Function
TestSpcovDecryptElement
(t *testing.T)
sp_coverage_parse_test.go:141
Function
TestSpcovElementToStringAndUnmarshal
(t *testing.T)
sp_coverage_test.go:415
Function
TestSpcovFindChildren
(t *testing.T)
sp_coverage_test.go:367
Function
TestSpcovFingerprint
(t *testing.T)
sp_coverage_test.go:290
Function
TestSpcovGetIDPSigningCertsNoSigningCert
(t *testing.T)
sp_coverage_test.go:109
Function
TestSpcovGetSigningContext
(t *testing.T)
sp_coverage_test.go:155
Function
TestSpcovHandleArtifactRequestTransportErrors
(t *testing.T)
sp_coverage_parse_test.go:373
Function
TestSpcovInvalidResponseErrorHidesDetails
(t *testing.T)
sp_coverage_test.go:55
Function
TestSpcovLogoutRequestSessionIndex
TestSpcovLogoutRequestSessionIndex checks that WithSessionIndex puts a SessionIndex element into SP initiated LogoutRequests for every binding, and th
sp_coverage_test.go:437
Function
TestSpcovMetadataOmitValidUntil
(t *testing.T)
sp_coverage_test.go:84
Function
TestSpcovMetadataValidDurationAndIntermediates
(t *testing.T)
sp_coverage_test.go:60
Function
TestSpcovNameIDFormatElement
(t *testing.T)
sp_coverage_test.go:29
Function
TestSpcovParseAssertionWithoutSignatureRequirement
(t *testing.T)
sp_coverage_parse_test.go:122
Function
TestSpcovParseCert
(t *testing.T)
sp_coverage_test.go:324
Function
TestSpcovParseResponseArtifact
(t *testing.T)
sp_coverage_parse_test.go:339
Function
TestSpcovParseResponseFindChildrenErrors
(t *testing.T)
sp_coverage_parse_test.go:109
Function
TestSpcovParseXMLArtifactResponse
(t *testing.T)
sp_coverage_parse_test.go:219
Function
TestSpcovParseXMLResponseErrors
(t *testing.T)
sp_coverage_parse_test.go:44
Function
TestSpcovParseXMLResponseHappyPath
(t *testing.T)
sp_coverage_parse_test.go:37
Function
TestSpcovSignedLogoutMessagesVerify
TestSpcovSignedLogoutMessagesVerify checks that the signatures produced by SignLogoutRequest and SignLogoutResponse validate against the SP certificat
sp_coverage_test.go:263
Function
TestSpcovSignedRedirectRequestCarriesVerifiableSignature
(t *testing.T)
sp_coverage_parse_test.go:866
Function
TestSpcovSigningErrors
TestSpcovSigningErrors covers the error propagation of every Sign*/Make* helper, both for a configuration error (GetSigningContext fails) and for a fa
sp_coverage_test.go:201
Function
TestSpcovValidateLogoutResponseContent
(t *testing.T)
sp_coverage_parse_test.go:711
Function
TestSpcovValidateLogoutResponseMalformed
(t *testing.T)
sp_coverage_parse_test.go:774
Function
TestSpcovValidateLogoutResponseRequest
(t *testing.T)
sp_coverage_parse_test.go:618
Function
TestSpcovValidateRequestID
(t *testing.T)
sp_coverage_test.go:340
Function
TestSpcovValidateSignatureCertificateSources
(t *testing.T)
sp_coverage_parse_test.go:445
Function
TestSpcovValidateSignatureMisc
(t *testing.T)
sp_coverage_parse_test.go:577
Function
TestSpecBinding_3_2_2_1_ArtifactResolveSOAPEnvelope
saml-bindings-2.0-os §3.2.2.1: "SAML request-response protocol elements MUST be enclosed within the SOAP message body" and "The SAML requester MUST NO
spec_bindings_test.go:433
Function
TestSpecBinding_3_2_3_ArtifactResolveHTTPHeaders
saml-bindings-2.0-os §3.2.3 (lines 342-345): the SOAP binding's HTTP transport "requires the use of a SOAPAction header as part of a SOAP HTTP request
spec_bindings_test.go:764
Function
TestSpecBinding_3_4_3_DefaultRelayStateWithin80Bytes
saml-bindings-2.0-os §3.4.3 and §3.5.3: RelayState "MUST NOT exceed 80 bytes in length and SHOULD be integrity protected". The default request tracker
samlsp/spec_bindings_test.go:41
Function
TestSpecBinding_3_4_3_IDPReturnsExactRelayState
saml-bindings-2.0-os §3.4.3 and §3.5.3: "If a SAML request message is accompanied by RelayState data, then the SAML responder MUST return its SAML pro
spec_bindings_test.go:253
Function
TestSpecBinding_3_4_3_LoginFormKeepsExactRelayState
saml-bindings-2.0-os §3.4.3 and §3.5.3: "If a SAML request message is accompanied by RelayState data, then the SAML responder MUST return its SAML pro
samlidp/spec_bindings_test.go:24
Function
TestSpecBinding_3_4_3_OriginatedRelayStateAtMost80Bytes
saml-bindings-2.0-os §3.4.3 and §3.5.3 (and SimpleSign §2.3): RelayState "MUST NOT exceed 80 bytes in length". With LimitRelayStateLength set, every r
spec_bindings_test.go:620
Function
TestSpecBinding_3_4_3_RelayStateFuncAtMost80Bytes
saml-bindings-2.0-os §3.4.3 and §3.5.3: RelayState "MUST NOT exceed 80 bytes in length". With LimitRelayStateLength set, a RelayStateFunc result longe
samlsp/spec_bindings_test.go:112
Function
TestSpecBinding_3_4_3_SLOResponseEchoesExactRelayState
saml-bindings-2.0-os §3.4.3 and §3.5.3: the SAML responder "MUST place the exact data it received with the request into the corresponding RelayState p
samlsp/spec_bindings_test.go:76
Function
TestSpecBinding_3_4_4_1_DeflateBase64NoWhitespace
saml-bindings-2.0-os §3.4.4.1 steps 2-4: the message is compressed with DEFLATE as specified in RFC 1951 (raw, no zlib/gzip wrapper), base64 encoded w
spec_bindings_test.go:91
Function
TestSpecBinding_3_4_4_1_RSASHA1LogoutRequest
saml-bindings-2.0-os §3.4.4.1 step 5: RSAwithSHA1 (http://www.w3.org/2000/09/xmldsig#rsa-sha1) MUST be supported, here for an HTTP-Redirect LogoutRequ
spec_bindings_test.go:233
Function
TestSpecBinding_3_4_4_1_RedirectMethodsRemoveXMLSignature
HTTP-Redirect, saml-bindings-2.0-os §3.4.4.1 (lines 578-579): "Any signature on the SAML protocol message, including the <ds:Signature> XML element it
spec_bindings_test.go:566
Function
TestSpecBinding_3_4_4_1_SignedOctetString
saml-bindings-2.0-os §3.4.4.1 (signing steps 1-4): the signed octet string is "SAMLRequest=value&RelayState=value&SigAlg=value" (or SAMLResponse=...)
spec_bindings_test.go:120
Function
TestSpecBinding_3_4_4_1_VerifyReordersAndUsesOriginalEncoding
saml-bindings-2.0-os §3.4.4.1: "the order of the query string parameters on the resulting URL to be verified is not prescribed by this binding ... the
spec_bindings_test.go:181
Function
TestSpecBinding_3_4_5_1_IdPResponsesAreNotCached
saml-bindings-2.0-os §3.4.5.1, §3.5.5.1 and §3.2.3.3: an HTTP responder carrying a SAML message SHOULD "Include a Cache-Control header field set to "n
spec_bindings_test.go:715
Function
TestSpecBinding_3_4_5_1_SAMLMessagesAreNotCached
saml-bindings-2.0-os §3.4.5.1 and §3.5.5.1: an HTTP response carrying a SAML message SHOULD "Include a Cache-Control header field set to "no-cache, no
samlsp/spec_bindings_test.go:152
Function
TestSpecBinding_3_4_5_IDPLogoutRedirectStatus
saml-bindings-2.0-os §3.4.5 step 2: when the HTTP-Redirect binding is used, "the HTTP status MUST be either 303 or 302". Checked for the IdP's HTTP-Re
spec_bindings_test.go:533
Function
TestSpecBinding_3_5_4_FormEncoding
saml-bindings-2.0-os §3.5.4: the message is base64 encoded into a form control named SAMLRequest (or SAMLResponse), RelayState goes into a hidden cont
spec_bindings_test.go:300
Function
TestSpecBinding_3_5_4_LineWrappedBase64Accepted
saml-bindings-2.0-os §3.5.4: "The base64-encoded value MAY be line-wrapped at a reasonable length in accordance with common practice." A recipient mus
spec_bindings_test.go:347
Function
TestSpecBinding_3_6_3_ArtifactURLAndFormEncoding
saml-bindings-2.0-os §3.6.3: "There are two methods of encoding an artifact ... All endpoints that support this binding MUST support both techniques":
spec_bindings_test.go:380
Function
TestSpecBinding_SimpleSign_2_5_SignedOctetString
sstc-saml-binding-simplesign-cs-01 §2.5 and §2.6: the SimpleSign signature is over "SAMLResponse=<raw XML>&RelayState=<value>&SigAlg=<value>", with no
spec_bindings_test.go:475
Function
TestSpecCore_1_3_1_AudienceAndRecipientExactComparison
saml-core §1.3.1 (lines 280-283), exact binary comparison, applied to the Audience URI (§2.5.1.4) and the SubjectConfirmationData Recipient (§2.4.1.2)
spec_core_assertions_test.go:187
Function
TestSpecCore_1_3_1_IssuerExactComparison
saml-core §1.3.1 (lines 280-283): "all elements in SAML documents that have the XML Schema xs:string type ... MUST be compared using an exact binary c
spec_core_assertions_test.go:168
Function
TestSpecCore_1_3_3_E92_ClockSkewTolerance
saml-core errata E92 (§1.3.3, errata lines 359-361): "SAML system entities SHOULD allow for reasonable clock skew ... Tolerances of 3-5 minutes are re
spec_core_assertions_test.go:275
Function
TestSpecCore_1_3_3_GeneratedTimesAreUTC
saml-core §1.3.3 (lines 311-312): "All SAML time values ... MUST be expressed in UTC form, with no time zone component." The IdP's assertion and the S
spec_core_assertions_test.go:210
Function
TestSpecCore_1_3_3_TimesInOtherZonesWrittenAsUTC
saml-core §1.3.3 (lines 311-312): SAML time values "MUST be expressed in UTC form, with no time zone component". Every time a message or assertion wri
spec_core_assertions_test.go:100
Function
TestSpecCore_1_3_4_GeneratedIDsAreRandomNCNames
saml-core §1.3.4 (lines 319-329): identifiers MUST have a negligible probability of collision; a random identifier MUST have collision probability <=
spec_core_assertions_test.go:243
Function
TestSpecCore_2_3_3_GeneratedAssertionRequiredAttributes
saml-core §2.3.3 (lines 550-558): Version, ID, IssueInstant and Issuer are Required on <Assertion>, and "The identifier for the version of SAML define
spec_core_assertions_test.go:298
Function
TestSpecCore_2_3_3_InvalidAssertionSignatureRejected
saml-core §2.3.3 (lines 597-600): if an assertion is signed, "a relying party MUST verify that the signature is valid ... If it is invalid, then the r
spec_core_assertions_test.go:319
Function
TestSpecCore_2_3_4_EncryptedAssertionValidatedAfterDecryption
saml-core §2.3.4 (lines 627-635): <EncryptedAssertion> carries an assertion in encrypted form. Once decrypted, the assertion is processed like a plain
spec_core_assertions_test.go:339
Function
TestSpecCore_2_4_1_2_ConfirmationWithinConditions
saml-core §2.4.1.2 (lines 756-757): the SubjectConfirmationData NotBefore/NotOnOrAfter period "SHOULD fall within the overall assertion validity perio
spec_core_assertions_test.go:73
Function
TestSpecCore_2_4_1_2_SubjectConfirmationDataConstraints
saml-core §2.4.1.2 (lines 719-732): NotBefore is "A time instant before which the subject cannot be confirmed", NotOnOrAfter "A time instant at which
spec_core_assertions_test.go:430
Function
TestSpecCore_2_4_1_AnyBearerSubjectConfirmationSuffices
saml-core §2.4.1 (lines 654-656): "If more than one subject confirmation is provided, then satisfying any one of them is sufficient to confirm the sub
spec_core_assertions_test.go:365
Function
TestSpecCore_2_5_1_2_NotOnOrAfterIsExclusive
saml-core §2.5.1.2 (lines 886-887): NotOnOrAfter "specifies the time instant at which the validity interval has ended", and §2.4.1.2 (lines 722-723):
spec_core_assertions_test.go:518
Function
TestSpecCore_2_5_1_2_OutsideValidityIntervalRejected
saml-core §2.5.1.2 (lines 886-887) and §2.5.1.1 rule 2 (lines 870-871, 879): NotBefore is when "the validity interval begins", NotOnOrAfter when it "h
spec_core_assertions_test.go:547
Function
TestSpecCore_2_5_1_2_UnspecifiedNotBeforeIsOpen
saml-core §2.5.1.2 (lines 888-891): "If the value for either NotBefore or NotOnOrAfter is omitted, then it is considered unspecified. If the NotBefore
spec_core_assertions_test.go:465
Function
TestSpecCore_2_5_1_2_UnspecifiedNotOnOrAfterHasNoExpiry
saml-core §2.5.1.2 (lines 891-893): "If the NotOnOrAfter attribute is unspecified (and if all other conditions that are supplied evaluate to Valid), t
spec_core_assertions_test.go:489
← previous
next →
2,101–2,200 of 2,436, ranked by callers