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
TestSPDecryptsWithDecryptionKeys
An assertion encrypted to one of DecryptionKeys decrypts, whatever key comes first and wherever the EncryptedKey is.
service_provider_decryption_keys_test.go:96
Function
TestSPDecryptsWithSeparateEncryptionKey
The SP decrypts assertions with EncryptionKey, even when Key is an ECDSA key that could not decrypt them.
service_provider_encryption_key_test.go:95
Function
TestSPEmptyPossibleRequestIDNeedsAllowIDPInitiated
An empty string among possibleRequestIDs does not accept an unsolicited response or assertion unless AllowIDPInitiated is set.
sp_review_empty_request_id_test.go:12
Function
TestSPEncryptLogoutNameID
The SP encrypts the NameID of the LogoutRequests it makes to the IdP's encryption certificate, and the IdP decrypts it and ends the session.
logout_request_identifiers_test.go:23
Function
TestSPEncryptLogoutNameIDDefaultCipher
The SP encrypts the NameID of its LogoutRequests with the strongest block cipher the IdP metadata lists, which for this package's IdP is AES-256-GCM,
logout_nameid_encryption_test.go:69
Function
TestSPFailToProduceSignedRequestWithBogusSignatureMethod
(t *testing.T)
service_provider_test.go:456
Function
TestSPInitiatedLogoutOnlyParticipant
(t *testing.T)
identity_provider_logout_propagation_test.go:405
Function
TestSPInitiatedLogoutParticipantLookupFails
(t *testing.T)
identity_provider_logout_propagation_test.go:420
Function
TestSPInitiatedLogoutPropagates
(t *testing.T)
samlidp/logout_propagation_test.go:154
Function
TestSPInitiatedLogoutPropagation
An SP-initiated LogoutRequest is propagated to the other participants before the initiating SP gets its LogoutResponse.
identity_provider_logout_propagation_test.go:359
Function
TestSPInitiatedLogoutPropagationOverSOAP
SP-initiated logout is propagated over SOAP, and the initiator gets its LogoutResponse at once.
identity_provider_logout_soap_test.go:219
Function
TestSPInitiatedLogoutRefusesNonParticipant
A service provider that the session was never used for cannot end it, or have the logout propagated to the SPs it was used for, by naming the user's N
idp_review_logout_participant_test.go:15
Function
TestSPInitiatedLogoutRoundTrip
TestSPInitiatedLogoutRoundTrip starts logout, answers the LogoutRequest as the IDP would, and delivers the LogoutResponse with the cookies the browser
samlsp/middleware_logout_test.go:452
Function
TestSPInitiatedLogoutWithoutRecordedParticipants
Without participants recorded for the session, nothing is known, and the request is honoured as before.
idp_review_logout_participant_test.go:37
Function
TestSPInvalidAssertions
(t *testing.T)
service_provider_test.go:1320
Function
TestSPInvalidResponses
(t *testing.T)
service_provider_test.go:2220
Function
TestSPLogoutRequestUnspecifiedNameIDFormat
(t *testing.T)
service_provider_test.go:499
Function
TestSPMetadataAdvertisesSeparateEncryptionCertificate
(t *testing.T)
service_provider_encryption_key_test.go:66
Function
TestSPMetadataAssertionConsumerServiceBindings
(t *testing.T)
service_provider_test.go:281
Function
TestSPMetadataCertificatesFlowFromOptions
(t *testing.T)
samlidp/signed_sp_metadata_test.go:98
Function
TestSPMetadataNameIDFormat
(t *testing.T)
service_provider_test.go:148
Function
TestSPMetadataOmitsEncryptionKeyForECDSACertificate
An ECDSA key cannot be used for XML encryption, so the metadata must not advertise it for encryption.
service_provider_encryption_key_test.go:50
Function
TestSPMetadataPrefersAESGCM
The SP's metadata lists the content encryption algorithms it accepts in order of preference. IdPs that honour the list should pick AES-GCM, which is a
sp_metadata_encryption_test.go:15
Function
TestSPMetadataPublishesSigningKeyWhenSigning
The SP metadata publishes the signing certificate whenever the SP signs messages the IdP has to verify with it, not only when AuthnRequests are signed
sp_review_metadata_signing_key_test.go:24
Function
TestSPMismatchedDestinationsWithNoSignaturePresent
(t *testing.T)
service_provider_test.go:1247
Function
TestSPMismatchedDestinationsWithSignaturePresent
(t *testing.T)
service_provider_test.go:1223
Function
TestSPMissingDestinationWithSignaturePresent
(t *testing.T)
service_provider_test.go:1268
Function
TestSPRealWorldAssertionSignedNotResponse
(t *testing.T)
service_provider_test.go:1765
Function
TestSPRealWorldKeyInfoHasRSAPublicKeyNotX509Cert
(t *testing.T)
service_provider_test.go:1737
Function
TestSPRedirectBindingInvalidXMLIsInvalidResponseError
Invalid XML in an HTTP-Redirect message to the SP is reported like every other failure of that path: as an *InvalidResponseError that matches ErrMalfo
idp_review_errors_test.go:51
Function
TestSPRefusesFutureIssueInstant
A Response or Assertion dated further in the future than MaxClockSkew is refused, as LogoutRequests and LogoutResponses already were; otherwise its Is
sp_review_issue_instant_test.go:15
Function
TestSPRejectSHA1DetachedSignatures
(t *testing.T)
sha1_policy_test.go:82
Function
TestSPRejectSHA1XMLSignatures
(t *testing.T)
sha1_policy_test.go:38
Function
TestSPRejectsBadEncryptedAttribute
An EncryptedAttribute that cannot be decrypted, or that does not hold an Attribute, makes the assertion refused rather than dropped.
subject_identifiers_test.go:198
Function
TestSPRejectsBadSubjectEncryptedID
(t *testing.T)
encrypted_id_test.go:180
Function
TestSPRejectsInjectedComment
(t *testing.T)
service_provider_test.go:867
Function
TestSPRejectsInvalidResponseSignatureBeforeOtherChecks
(t *testing.T)
service_provider_test.go:1292
Function
TestSPRejectsMalformedResponse
(t *testing.T)
service_provider_test.go:2176
Function
TestSPResponseAndAssertionInResponseToMustAgree
An assertion issued for one pending request cannot be accepted inside a Response that answers another.
sp_review_in_response_to_test.go:12
Function
TestSPResponseWithNoIssuer
(t *testing.T)
service_provider_test.go:1873
Function
TestSPSignaturesIncludeIntermediates
(t *testing.T)
sp_signed_metadata_test.go:141
Function
TestSPSignedMetadata
(t *testing.T)
sp_signed_metadata_test.go:51
Function
TestSPSubjectEncryptedIDIsSigned
The signature covers the EncryptedID as sent: swapping it for another one breaks the signature.
encrypted_id_test.go:257
Function
TestSPToIDPAcsIndexRoundTrip
The IdP resolves the index the SP sends to the matching endpoint in the SP metadata, including its binding.
acs_index_test.go:57
Function
TestSPValidateAuthnContextClassRef
(t *testing.T)
service_provider_test.go:2358
Function
TestSPValidateAuthnContextClassRefParseResponse
(t *testing.T)
service_provider_test.go:2602
Function
TestSPValidateRequestIDWithAllowIDPInitiated
(t *testing.T)
service_provider_test.go:2344
Function
TestSPValidateSignatureMultipleCertsWithoutX509Certificate
TestSPValidateSignatureMultipleCertsWithoutX509Certificate covers IdPs whose metadata lists several signing certificates and whose Signature KeyInfo c
service_provider_multicert_test.go:42
Function
TestSPWithoutDecryptionKeysErrorUnchanged
Without DecryptionKeys the error is what it always was.
service_provider_decryption_keys_test.go:155
Function
TestSaferFlateReaderReadsMessageAtLimit
The limit applies to the bytes inflated, not to the size of the buffer they are read into: io.ReadAll grows its buffer past the limit well before the
flate_limit_test.go:27
Function
TestSaferFlateReaderRejectsMessageOverLimit
(t *testing.T)
flate_limit_test.go:34
Function
TestSchemacovArtifactResolve
(t *testing.T)
schema_coverage_test.go:245
Function
TestSchemacovArtifactResponse
(t *testing.T)
schema_coverage_test.go:306
Function
TestSchemacovAssertionElement
(t *testing.T)
schema_coverage_test.go:406
Function
TestSchemacovAssertionElementPanicsOnInvalidNamespace
(t *testing.T)
schema_coverage_test.go:484
Function
TestSchemacovAttributeValueElement
(t *testing.T)
schema_coverage_test.go:520
Function
TestSchemacovAuthnRequestElement
(t *testing.T)
schema_coverage_test.go:146
Function
TestSchemacovConditionsElements
(t *testing.T)
schema_coverage_test.go:501
Function
TestSchemacovIssuerAndNameIDElement
(t *testing.T)
schema_coverage_test.go:207
Function
TestSchemacovLogoutRequest
(t *testing.T)
schema_coverage_test.go:87
Function
TestSchemacovLogoutResponse
(t *testing.T)
schema_coverage_test.go:539
Function
TestSchemacovResponse
(t *testing.T)
schema_coverage_test.go:352
Function
TestSchemacovStatusElement
(t *testing.T)
schema_coverage_test.go:284
Function
TestSchemacovUnmarshalXMLBadTime
TestSchemacovUnmarshalXMLBadTime feeds an unparseable time attribute to each UnmarshalXML implementation that converts RelaxedTime values, so the Deco
schema_coverage_test.go:58
Function
TestScopingElement
(t *testing.T)
schema_test.go:407
Function
TestScopingElementMinimal
(t *testing.T)
schema_test.go:451
Function
TestSendSOAPLogoutRequest
(t *testing.T)
service_provider_soap_logout_test.go:375
Function
TestSendSOAPLogoutRequestPartialLogout
(t *testing.T)
service_provider_soap_logout_test.go:402
Function
TestSendSOAPLogoutRequestRejects
(t *testing.T)
service_provider_soap_logout_test.go:417
Function
TestSendSOAPLogoutRequestTransport
(t *testing.T)
service_provider_soap_logout_test.go:474
Function
TestServeSLOEmpty
(t *testing.T)
samlsp/middleware_logout_test.go:534
Function
TestServeSLOFrontChannelPartialLogout
When the other copies of the session cannot be ended because the revocation store is full, the browser's session is still deleted, the failure is repo
samlsp/front_channel_partial_logout_test.go:72
Function
TestServeSLOFrontChannelPlainSuccess
When the other copies were ended, or the session provider cannot end sessions on the server at all, the IdP is answered with a plain Success: the brow
samlsp/front_channel_partial_logout_test.go:103
Function
TestServeSLOFrontChannelProviderCannotTerminate
When the session provider cannot end sessions on the server, a front-channel LogoutRequest still deletes the browser's session and is answered with Su
samlsp/front_channel_revocation_test.go:152
Function
TestServeSLOFrontChannelRevokesOtherCopies
A LogoutRequest the IdP sends through the browser ends the named session in other browsers too: a copy of the session with the same SessionIndex is re
samlsp/front_channel_revocation_test.go:98
Function
TestServeSLOFrontChannelWithoutSessionIndex
A front-channel LogoutRequest without a SessionIndex ends every session of its NameID issued before it, but not a later login or other users' sessions
samlsp/front_channel_revocation_test.go:127
Function
TestServeSLOLogoutRequestPostBinding
(t *testing.T)
samlsp/middleware_logout_test.go:505
Function
TestServeSLOLogoutRequestRedirectBinding
(t *testing.T)
samlsp/middleware_logout_test.go:482
Function
TestServeSLOLogoutRequestReplay
With ServiceProvider.ReplayCache set, ServeSLO answers an IdP-initiated LogoutRequest once and refuses the same request again.
samlsp/logout_replay_test.go:27
Function
TestServeSLOLogoutRequestSimpleSignResponse
(t *testing.T)
samlsp/simplesign_logout_test.go:172
Function
TestServeSLOLogoutRequestUnsigned
(t *testing.T)
samlsp/middleware_logout_test.go:522
Function
TestServeSLOLogoutRequestWithSOAPLogoutBinding
The LogoutResponse to IdP initiated front-channel logout is sent through the browser when LogoutBinding is SOAP.
samlsp/soap_start_logout_test.go:342
Function
TestServeSLOLogoutResponse
(t *testing.T)
samlsp/middleware_logout_test.go:356
Function
TestServeSLOReceivesSimpleSign
ServeSLO accepts logout messages sent with the HTTP-POST-SimpleSign binding, whatever LogoutBinding is.
samlsp/simplesign_logout_test.go:214
Function
TestServeSLOSOAPLogoutRequestCodecWithoutRevocation
A CookieSessionProvider whose Codec does not declare that its sessions can be revoked answers a SOAP LogoutRequest with Responder rather than Success:
samlsp/session_revocation_codec_test.go:67
Function
TestServeSLOSOAPLogoutRequestCookieTampering
A client cannot get a revoked session back by changing its cookie: the claims that identify the session are covered by the JWT signature.
samlsp/middleware_soap_logout_test.go:246
Function
TestServeSLOSOAPLogoutRequestEndsSession
A LogoutRequest from the IdP over SOAP for one SessionIndex ends that session: the next request with its cookie has no session. The user's other sessi
samlsp/middleware_soap_logout_test.go:176
Function
TestServeSLOSOAPLogoutRequestRejects
Invalid SOAP LogoutRequests are answered with a SOAP Fault, passed to OnError, and end no session.
samlsp/middleware_soap_logout_test.go:293
Function
TestServeSLOSOAPLogoutRequestReplay
A replayed SOAP LogoutRequest is refused when a ReplayCache is set.
samlsp/middleware_soap_logout_test.go:352
Function
TestServeSLOSOAPLogoutRequestResponder
When the session provider cannot end sessions on the server, the IdP is told so with the status Responder.
samlsp/middleware_soap_logout_test.go:378
Function
TestServeSLOSOAPLogoutRequestSessionWithoutIndex
A session that has no SessionIndex cannot be told apart from the one a LogoutRequest names, so it is ended too.
samlsp/middleware_soap_logout_test.go:234
Function
TestServeSLOSOAPLogoutRequestWithoutSessionIndex
A LogoutRequest without a SessionIndex ends every session of its NameID issued before it (saml-core §3.7.1), but not a later login.
samlsp/middleware_soap_logout_test.go:209
Function
TestServeSLOSOAPNotSOAPContentType
A posted body that is not text/xml is not taken for a SOAP message.
samlsp/middleware_soap_logout_test.go:366
Function
TestServiceProviderCanHandleSignedAssertionsResponse
(t *testing.T)
service_provider_test.go:1796
Function
TestServiceProviderLogoutResponseWithStatus
The status-taking LogoutResponse builders put the status in the response of each binding, signed as the binding requires, so that the signature covers
logout_response_status_test.go:55
Function
TestServiceProviderMismatchedDestinationsWithSignaturePresent
(t *testing.T)
service_provider_test.go:1131
Function
TestServiceProviderMissingDestinationWithSignaturePresent
(t *testing.T)
service_provider_test.go:1200
Function
TestServiceProviderRequestsAdvertisedNameIDFormat
TestServiceProviderRequestsAdvertisedNameIDFormat checks the documented way for a service provider to work with a samlidp IdP that enforces the NameID
samlidp/nameid_formats_test.go:133
Function
TestServicesCrud
(t *testing.T)
samlidp/service_test.go:14
Function
TestSessionCookieSecureFromTLS
A server-side request carries no scheme in r.URL, only r.TLS. The session cookie is Secure whenever the request arrived over TLS, both when it is set
samlsp/session_cookie_secure_test.go:18
← previous
next →
2,001–2,100 of 2,436, ranked by callers