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
TestIDPServeSSOExpiredRequest
(t *testing.T)
idp_error_response_test.go:270
Function
TestIDPServeSSORefusesReplayedSignedAuthnRequest
A signed AuthnRequest is answered with an assertion once; a replay of it is refused. The ID is recorded only when a session is returned.
idp_review_authn_replay_test.go:15
Function
TestIDPServeSSOSendErrorResponsesKeeps400
(t *testing.T)
idp_error_response_test.go:371
Function
TestIDPServeSSOStatusErrorCannotSign
(t *testing.T)
idp_error_response_test.go:209
Function
TestIDPServeSSOVersionMismatch
(t *testing.T)
idp_error_response_test.go:333
Function
TestIDPSignedAuthnRequestRequiresDestination
(t *testing.T)
xhtml_forms_test.go:199
Function
TestIDPSigningWithNilKey
TestIDPSigningWithNilKey is a regression test for https://github.com/crewjam/saml/issues/405: a nil or typed-nil key used to panic deep inside the XML
idp_coverage_test.go:539
Function
TestIDPStatusErrorMessage
(t *testing.T)
idp_error_response_test.go:169
Function
TestIDPUnknownServiceProviderWrappedErrNotExist
A ServiceProviderProvider that wraps os.ErrNotExist, as its documentation allows errors to be wrapped elsewhere in Go, is still understood as "unknown
idp_review_errors_test.go:25
Function
TestIDPValidateRejectsMissingIssuer
An AuthnRequest without an Issuer in the assertion namespace is refused with an error rather than a nil-pointer panic.
identity_provider_test.go:1441
Function
TestIDPVerifiesPostAuthnRequestSignature
(t *testing.T)
idp_review_authn_signature_test.go:54
Function
TestIDPVerifiesRedirectAuthnRequestSignature
(t *testing.T)
idp_review_authn_signature_test.go:36
Function
TestIDPWantAuthnRequestsSigned
(t *testing.T)
idp_review_authn_signature_test.go:99
Function
TestIDPWriteResponse
(t *testing.T)
identity_provider_test.go:935
Function
TestIdentifierEncrypter
(t *testing.T)
logout_nameid_encryption_test.go:24
Function
TestIdentityProviderOnError
(t *testing.T)
errors_test.go:455
Function
TestIdpAuthnRequestErrorKinds
(t *testing.T)
errors_test.go:272
Function
TestIdpLogoutRequestMatchesAnySessionIndex
(t *testing.T)
logout_request_session_indexes_test.go:89
Function
TestIdpLogoutRequestMatchesSession
(t *testing.T)
identity_provider_logout_test.go:537
Function
TestIdpLogoutRequestMisuse
(t *testing.T)
identity_provider_logout_test.go:554
Function
TestInnerSignatureUsesNamespacesAsReceived
An inner signature is checked against the element as received, not as rebuilt from what the outer signature covers, which can lack namespace declarati
inner_signature_test.go:241
Function
TestInvalidCertificateErrorKinds
(t *testing.T)
errors_test.go:416
Function
TestIsLocalRedirect
(t *testing.T)
samlsp/middleware_test.go:921
Function
TestIsNil
(t *testing.T)
internal/signerutil/signerutil_test.go:12
Function
TestIsPassiveWithExpiredSessionSendsNoPassive
TestIsPassiveWithExpiredSessionSendsNoPassive checks that an expired session is treated as no session.
samlidp/force_authn_passive_test.go:205
Function
TestIsPassiveWithInvalidCredentialsSendsNoPassive
TestIsPassiveWithInvalidCredentialsSendsNoPassive checks that invalid credentials posted with a passive request do not bring up the login form.
samlidp/force_authn_passive_test.go:243
Function
TestIsPassiveWithSessionUsesSession
TestIsPassiveWithSessionUsesSession checks that IsPassive="true" with a session gets an assertion for that session.
samlidp/force_authn_passive_test.go:215
Function
TestIsPassiveWithUnknownSessionSendsNoPassive
TestIsPassiveWithUnknownSessionSendsNoPassive checks that a session cookie that names no session is treated as no session.
samlidp/force_authn_passive_test.go:197
Function
TestIsPassiveWithoutSessionSendsNoPassive
TestIsPassiveWithoutSessionSendsNoPassive checks that IsPassive="true" without a session shows no login form and answers with NoPassive.
samlidp/force_authn_passive_test.go:189
Function
TestIsSOAPRequest
(t *testing.T)
service_provider_soap_logout_test.go:289
Function
TestJWTSessionCodecClock
(t *testing.T)
samlsp/clock_test.go:43
Function
TestJWTSessionCodecNewNameIDAttributeValue
TestJWTSessionCodecNewNameIDAttributeValue checks that an AttributeValue whose content is a <saml:NameID> element (e.g. eduPersonTargetedID) is stored
samlsp/session_jwt_test.go:16
Function
TestJWTSessionCodec_CryptoSignerEncodeDecode
(t *testing.T)
samlsp/middleware_test.go:784
Function
TestJWTSessionCodec_UnsupportedAlgorithmReturnsError
(t *testing.T)
samlsp/middleware_test.go:885
Function
TestJWTSessionNameIDClaimsOmitted
(t *testing.T)
samlsp/middleware_attribute_query_test.go:76
Function
TestJWTSessionNameIDClaimsRoundTrip
(t *testing.T)
samlsp/middleware_attribute_query_test.go:53
Function
TestJWTSessionWithoutNameIDClaims
TestJWTSessionWithoutNameIDClaims decodes a session issued before JWTSessionCodec recorded the NameID's Format and qualifiers.
samlsp/middleware_attribute_query_test.go:109
Function
TestJWTTrackedRequestCodecClock
(t *testing.T)
samlsp/clock_test.go:65
Function
TestLinksConcurrentAccess
(t *testing.T)
example/service_test.go:106
Function
TestListLinksUsesSessionNotHeader
(t *testing.T)
example/service_test.go:66
Function
TestLoginAllowsCrossOriginPostWithoutCredentials
A cross-site POST that carries no credentials, such as an AuthnRequest with the HTTP-POST binding, is not refused.
samlidp/login_csrf_test.go:52
Function
TestLoginAlwaysRunsBcrypt
TestLoginAlwaysRunsBcrypt checks that every login attempt performs exactly one bcrypt comparison against a real hash, whether or not the user exists,
samlidp/session_timing_test.go:24
Function
TestLoginLogsUsernameQuoted
A username with a newline cannot forge a log line.
samlidp/login_log_test.go:17
Function
TestLoginRefusesCrossOriginCredentials
Credentials posted by a browser from another site are refused, so that a page elsewhere cannot log the victim's browser in as the attacker.
samlidp/login_csrf_test.go:15
Function
TestLoginSchedulesSessionDeletion
A login schedules the deletion of the session it stores.
samlidp/session_expiry_test.go:162
Function
TestLogoutErrorKinds
(t *testing.T)
errors_test.go:204
Function
TestLogoutPropagatesToEveryServiceProvider
(t *testing.T)
samlidp/logout_propagation_test.go:125
Function
TestLogoutRequestBaseIDXML
(t *testing.T)
logout_request_identifiers_test.go:201
Function
TestLogoutRequestMarshalWithoutNotOnOrAfter
(t *testing.T)
schema_test.go:298
Function
TestLogoutRequestSessionIndexesXML
(t *testing.T)
logout_request_session_indexes_test.go:26
Function
TestLogoutRequestSingleSessionIndexUnchanged
(t *testing.T)
logout_request_session_indexes_test.go:51
Function
TestLogoutRequestXMLRoundTrip
(t *testing.T)
schema_test.go:257
Function
TestLogoutStateCookieGivesUpOnParticipantsThatDoNotFit
When the state still does not fit, the last participants are given up on and reported as failed, rather than setting a cookie the browser drops.
idp_review_logout_state_test.go:81
Function
TestLogoutStateCookieIsCompact
A dozen participants used to make a cookie of over 6 KB, which browsers drop. The state is now deflated.
idp_review_logout_state_test.go:65
Function
TestLogoutStateUndeflatedIsRead
A state written before it was deflated (plain base64 JSON, no prefix) is still read, so a logout in progress during an upgrade carries on.
idp_review_logout_state_test.go:97
Function
TestLogoutWithoutSession
(t *testing.T)
samlidp/logout_propagation_test.go:147
Function
TestLookupDeletesOldExpiredSession
Looking up a session that expired long ago deletes it.
samlidp/session_expiry_test.go:177
Function
TestLookupElementNamespaceMatchesSubContext
lookupElementNamespace must find what SubContext and LookupPrefix find, and checkNamespaceDeclarations must refuse what SubContext refuses.
find_children_test.go:67
Function
TestMakeArtifactResolveRequest
(t *testing.T)
service_provider_test.go:1920
Function
TestMakeAssertionElDefaultFallsBackToCBC
An SP whose metadata lists no block cipher still gets AES-128-CBC, which every implementation can decrypt.
identity_provider_assertion_encrypter_test.go:100
Function
TestMakeAssertionElDefaultUsesGCMWhenListed
By default the assertion is encrypted with the strongest block cipher the SP's metadata lists: this package's SP lists AES-256-GCM.
identity_provider_assertion_encrypter_test.go:94
Function
TestMakeAssertionElUsesConfiguredEncrypter
A configured AssertionEncrypter is used as is, whatever the SP lists.
identity_provider_assertion_encrypter_test.go:110
Function
TestMakeAttributeQuery
(t *testing.T)
service_provider_attribute_query_test.go:138
Function
TestMakeAttributeQueryErrors
(t *testing.T)
service_provider_attribute_query_test.go:196
Function
TestMakeAttributeQuerySignatureMethod
(t *testing.T)
service_provider_attribute_query_test.go:175
Function
TestMakeAttributeQueryWithoutKeyIsUnsigned
(t *testing.T)
service_provider_attribute_query_test.go:189
Function
TestMakeSOAPLogoutRequest
(t *testing.T)
service_provider_soap_logout_test.go:513
Function
TestMakeSOAPLogoutResponse
(t *testing.T)
service_provider_soap_logout_test.go:257
Function
TestMakeSignedArtifactResolveRequest
(t *testing.T)
service_provider_test.go:1939
Function
TestMakeSignedArtifactResolveRequestWithBogusSignatureMethod
(t *testing.T)
service_provider_test.go:1959
Function
TestMarshalXMLOmitsEmptyOptionalAttributes
TestMarshalXMLOmitsEmptyOptionalAttributes checks that optional attributes that are unset are left out, rather than written as empty strings (Assertio
schema_review_marshal_test.go:48
Function
TestMarshalXMLOnValues
TestMarshalXMLOnValues checks that the custom MarshalXML methods of the protocol types are used when a value, not a pointer, is marshalled: the signat
schema_review_marshal_test.go:17
Function
TestMemoryReplayCacheAlreadyExpired
An ID recorded with an expiry that has already passed takes no room.
samlsp/replay_cache_test.go:85
Function
TestMemoryReplayCacheConcurrentDistinctIDs
(t *testing.T)
samlsp/replay_cache_test.go:132
Function
TestMemoryReplayCacheConcurrentSameID
(t *testing.T)
samlsp/replay_cache_test.go:106
Function
TestMemoryReplayCacheFull
A full cache refuses new IDs instead of dropping an unexpired one, and accepts them again once IDs have expired.
samlsp/replay_cache_test.go:56
Function
TestMemoryReplayCacheRefusesReplay
(t *testing.T)
samlsp/replay_cache_test.go:33
Function
TestMemorySessionRevocationStore
(t *testing.T)
samlsp/middleware_soap_logout_test.go:461
Function
TestMemoryStoresClock
(t *testing.T)
samlsp/clock_test.go:82
Function
TestMetadataAdvertisesIssuedNameIDFormats
Tests for the NameID formats samlidp advertises and issues (issue #868). TestMetadataAdvertisesIssuedNameIDFormats checks that the samlidp metadata li
samlidp/nameid_formats_test.go:20
Function
TestMetadataCovCheckEndpointLocationBadURL
(t *testing.T)
metadata_coverage_test.go:58
Function
TestMetadataCovEndpointUnmarshal
(t *testing.T)
metadata_coverage_test.go:63
Function
TestMetadataCovEntitiesDescriptorRoundTrip
(t *testing.T)
metadata_coverage_test.go:13
Function
TestMetadataCovEntitiesDescriptorUnmarshalError
(t *testing.T)
metadata_coverage_test.go:52
Function
TestMetadataCovEntitiesDescriptorWithoutOptionalAttrs
(t *testing.T)
metadata_coverage_test.go:40
Function
TestMetadataCovIndexedEndpointUnmarshal
(t *testing.T)
metadata_coverage_test.go:105
Function
TestMetadataExtensions
(t *testing.T)
metadata_extensions_test.go:35
Function
TestMetadataExtensionsOmittedWhenUnset
(t *testing.T)
metadata_extensions_test.go:162
Function
TestMetadataExtensionsRoundTripAllDescriptors
(t *testing.T)
metadata_extensions_test.go:98
Function
TestMetadataKeepsHTTPPostSimpleSignLocations
(t *testing.T)
metadata_test.go:423
Function
TestMetadataNameIDFormatsCanBeOverridden
TestMetadataNameIDFormatsCanBeOverridden checks that NameIDFormats set on the IdentityProvider after New are the ones advertised.
samlidp/nameid_formats_test.go:32
Function
TestMetadataOptions
The metadata served by samlidp publishes Options.ExtraCertificates and Options.MetadataScopes, and its single logout endpoint with the bindings ServeS
samlidp/metadata_options_test.go:48
Function
TestMetadataOptionsDefault
Without the options, the metadata publishes only Certificate and no scopes, as before.
samlidp/metadata_options_test.go:87
Function
TestMetadataRoundTrip
TestMetadataRoundTrip checks that metadata survives being parsed and written out again, and that what is written follows the element order and attribu
metadata_roundtrip_test.go:31
Function
TestMetadataSOAPSingleLogoutService
(t *testing.T)
service_provider_soap_logout_test.go:308
Function
TestMetadataSignatureFromLargerDocumentDeclaresItsDefaultNamespace
(t *testing.T)
metadata_signature_test.go:165
Function
TestMetadataSignatureFromLargerDocumentDeclaresItsPrefix
(t *testing.T)
metadata_signature_test.go:129
Function
TestMetadataSignatureKeepsPrefixDeclaredOnAncestor
(t *testing.T)
metadata_signature_test.go:114
Function
TestMetadataSignatureRoundTripsAtEveryLevel
(t *testing.T)
metadata_signature_test.go:46
Function
TestMetadataValidatesUrlSchemeForProtocolBinding
(t *testing.T)
metadata_test.go:169
← previous
next →
1,701–1,800 of 2,436, ranked by callers