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
↓ 2 callers
Method
logoutStateCookie
logoutStateCookie returns the cookie that holds the logout state, with value, scoped to LogoutURL. A LogoutResponse sent with the HTTP-POST binding ar
identity_provider_logout_propagation.go:902
↓ 2 callers
Function
logoutStateWith
logoutStateWith returns a logout state with n pending participants, each with its own entity ID and transient NameID.
idp_review_logout_state_test.go:30
↓ 2 callers
Function
lookupElementNamespace
lookupElementNamespace returns the namespace of el's prefix, given parentCtx, the namespace context of el's parent: what parentCtx.SubContext(el) foll
service_provider.go:3747
↓ 2 callers
Function
metadataClient
metadataClient returns a client whose every response has body as its body.
samlsp/fetch_metadata_limit_test.go:16
↓ 2 callers
Function
metadataRootElement
metadataRootElement returns the name of the root element of data.
samlsp/fetch_metadata.go:166
↓ 2 callers
Function
mustParseCertificate
(pemStr []byte)
samlidp/samlidp_test.go:55
↓ 2 callers
Function
mustParsePrivateKey
(pemStr []byte)
identity_provider_test.go:55
↓ 2 callers
Function
mustParsePrivateKey
(pemStr []byte)
samlidp/samlidp_test.go:43
↓ 2 callers
Function
mustPost
(t *testing.T, sp *ServiceProvider, relayState string)
spec_bindings_test.go:287
↓ 2 callers
Method
nameIDFormat
()
service_provider.go:3269
↓ 2 callers
Function
nameIDFormatsAssert
nameIDFormatsAssert runs DefaultAssertionMaker for session with an AuthnRequest whose NameIDPolicy asks for format, and returns the NameID issued or t
samlidp/nameid_formats_test.go:56
↓ 2 callers
Function
nameIDFormatsSession
nameIDFormatsSession logs in the user alice, created with the given JSON, and returns her session.
samlidp/nameid_formats_test.go:42
↓ 2 callers
Function
namespaceDeclaration
(prefix, uri string)
etree_xml.go:110
↓ 2 callers
Function
namespaceDeclarations
namespaceDeclarations returns n namespace declarations, to make every namespace context built under them expensive to copy.
find_children_test.go:17
↓ 2 callers
Method
narrow
narrow returns v further restricted by an EntitiesDescriptor's validUntil and cacheDuration, either of which may be nil.
samlsp/fetch_metadata.go:234
↓ 2 callers
Function
newAQTestAuthority
newAQTestAuthority starts an attribute authority for lt's IdP and adds it to the IdP metadata.
samlsp/middleware_attribute_query_test.go:142
↓ 2 callers
Function
newFrontChannelLogoutTest
newFrontChannelLogoutTest returns a logoutTest whose IDP answers logout only with responseBinding, and whose OnError records the errors it is passed i
samlsp/front_channel_partial_logout_test.go:22
↓ 2 callers
Function
newIssueInstantRequest
newIssueInstantRequest returns a validated-looking request whose IssueInstant is offset from now.
idp_review_issue_instant_test.go:14
↓ 2 callers
Function
newSOAPLogoutServerTest
(t *testing.T)
samlidp/logout_soap_test.go:159
↓ 2 callers
Function
newSigningSP
newSigningSP returns a service provider that trusts a freshly generated IdP certificate, and a signing context holding that certificate's key.
signature_size_test.go:23
↓ 2 callers
Function
optionalRelaxedTime
optionalRelaxedTime returns t as a *RelaxedTime, or nil if t is the zero time. It is used for optional time attributes, so that MarshalXML leaves out
time.go:23
↓ 2 callers
Method
parseAssertion
(assertionEl *etree.Element, possibleRequestIDs []string, now time.Time, signatureRequirement signatureRequire
service_provider.go:1955
↓ 2 callers
Function
parseCost
parseCost parses buf as a response, which must fail, and returns the bytes allocated per byte of input and the error. It skips the checks ParseXMLResp
find_children_test.go:30
↓ 2 callers
Method
parseLogoutResponseForm
(postFormData string)
service_provider.go:3401
↓ 2 callers
Method
parseLogoutResponseRequest
(req *http.Request)
service_provider.go:3342
↓ 2 callers
Method
parseReceivedAssertion
parseReceivedAssertion is parseAssertion, where receivedEl is the assertion as received (see receivedChildren), on which its signature is checked.
service_provider.go:1962
↓ 2 callers
Method
parseReceivedResponse
(responseEl, receivedEl *etree.Element, possibleRequestIDs []string, now time.Time, signatureRequirement signa
service_provider.go:1698
↓ 2 callers
Function
parseRedirect
(u *url.URL, param, what string)
testsaml/parse.go:34
↓ 2 callers
Function
parseSPMetadata
parseSPMetadata parses the metadata document data as getSPMetadata does, without checking any signature.
samlidp/util.go:89
↓ 2 callers
Method
parseXMLResponse
parseXMLResponse is ParseXMLResponse with the signature requirement for the Response element given by signatureRequirement.
service_provider.go:1591
↓ 2 callers
Function
parseXMLResponseCost
(t *testing.T, e *spcovEnv, buf []byte)
xml_structure_budget_test.go:32
↓ 2 callers
Function
partialLogoutStatus
partialLogoutStatus is the status of a logout that ended the session it was sent with but not every session it names (saml-core-2.0-os §3.7.3.2).
logout_response_status_test.go:19
↓ 2 callers
Method
participantLogoutRequest
participantLogoutRequest returns an unsigned LogoutRequest for the session of participant, addressed to destination. If EncryptLogoutNameID is set, it
identity_provider_logout_propagation.go:352
↓ 2 callers
Method
participantMetadata
participantMetadata returns the metadata of the service provider of participant.
identity_provider_logout_propagation.go:333
↓ 2 callers
Method
participantsUnknown
participantsUnknown reports whether a logout cannot reach every other session participant because they are not known, given what sessionParticipants r
identity_provider_logout_propagation.go:150
↓ 2 callers
Function
postSOAPMessage
postSOAPMessage sends envelope to location with the SAML SOAP binding, using httpClient and ctx, and returns the body of the response, which must have
soap.go:129
↓ 2 callers
Method
prepareSOAPLogout
prepareSOAPLogout makes and signs the LogoutRequest logoutParticipantSOAP sends. It uses RandReader, so it is not run concurrently.
identity_provider_logout_soap.go:79
↓ 2 callers
Method
promptLogin
promptLogin asks the user to log in with the login form, showing toast. If the AuthnRequest has IsPassive="true", the identity provider must not inter
samlidp/session.go:250
↓ 2 callers
Function
qualifiedName
(prefix, local string)
etree_xml.go:94
↓ 2 callers
Function
randomBytes
(n int)
samlsp/util.go:22
↓ 2 callers
Function
readPostForm
readPostForm returns the fields of the url-encoded body of r, or ErrFormTooLarge if the body is longer than maxSize bytes.
samlsp/form_replay.go:184
↓ 2 callers
Method
readRedirectBindingMessage
readRedirectBindingMessage decodes the HTTP-Redirect binding message carried in messageParam of rawQuery and authenticates it, returning the root elem
redirect_binding.go:264
↓ 2 callers
Function
readSPMetadata
readSPMetadata reads a metadata document from r, at most MaxServiceMetadataSize bytes.
samlidp/util.go:63
↓ 2 callers
Method
readSimpleSignMessage
readSimpleSignMessage authenticates the SimpleSign message m and returns the root element of its protocol message. The SimpleSign signature is checked
simplesign_binding.go:238
↓ 2 callers
Method
recordSessionParticipant
recordSessionParticipant records the service provider of req as a participant of session, if the SessionProvider is a SessionParticipantTracker. It is
identity_provider_logout_propagation.go:79
↓ 2 callers
Method
refreshServiceProvider
refreshServiceProvider makes serviceProviders accept entityID with the metadata of a stored service that has that entity ID, or stop accepting it if n
samlidp/service.go:293
↓ 2 callers
Method
refuseNonParticipantLogout
refuseNonParticipantLogout logs that req, a valid LogoutRequest, is refused because its service provider is not a participant of the sessions it names
identity_provider_logout.go:652
↓ 2 callers
Function
replayForm
replayForm renders the auto-submitting form that posts form to uri.
samlsp/form_replay.go:244
↓ 2 callers
Function
replayPrivateErr
(t *testing.T, err error)
replay_cache_test.go:63
↓ 2 callers
Function
replayedSignatureResponse
replayedSignatureResponse returns an unsigned Response holding an assertion that was validly signed and then given decls namespace declarations and el
xml_structure_budget_test.go:20
↓ 2 callers
Function
reqSubjNewTestFormat
reqSubjNewTestFormat is reqSubjNewTest with the given NameID Format.
idp_request_subject_test.go:29
↓ 2 callers
Method
requestSubjectStatusError
requestSubjectStatusError returns the status CheckRequestSubject reports, or nil.
identity_provider_request_subject.go:51
↓ 2 callers
Function
requireAdminToken
requireAdminToken is an example AdminMiddleware that also records which requests it saw.
samlidp/admin_middleware_test.go:18
↓ 2 callers
Method
requireIDPSignature
requireIDPSignature verifies the enveloped signature of el, which must have one, against the IdP's signing certificates, and returns what the signatur
service_provider_soap_logout.go:130
↓ 2 callers
Function
resolveLogoutRequestNameID
resolveLogoutRequestNameID makes sure req identifies the principal with exactly one of BaseID, NameID and EncryptedID, as saml-core-2.0-os §3.7.1 requ
encrypted_id.go:64
↓ 2 callers
Function
resolveQName
resolveQName resolves the prefix of an unresolved QName (one with an empty Space and a prefixed Local, as RoleDescriptor.XSIType holds it) with the na
metadata.go:1115
↓ 2 callers
Function
resolveRoleDescriptorTypes
resolveRoleDescriptorTypes resolves the prefixes of the XSIType of the RoleDescriptors of ed that are still unresolved, with the namespace declaration
metadata.go:1134
↓ 2 callers
Method
resolveServiceProvider
resolveServiceProvider is the part of Validate that looks up the service provider that issued the request, checks its signature (see verifySignature),
identity_provider.go:1162
↓ 2 callers
Function
rsaEncryptOAEP
rsaEncryptOAEP encrypts msg with RSA-OAEP using the hashes and label in opts. The OAEP digest and the MGF1 hash may differ. Before Go 1.26, crypto/rs
xmlenc/oaep_go125.go:15
↓ 2 callers
Function
safeNamespacePrefix
safeNamespacePrefix reports whether prefix cannot be the name of an attribute field of the protocol and assertion types, all of which start with an up
unmarshal_untrusted.go:128
↓ 2 callers
Method
sameSite
sameSite returns the SameSite mode for the tracking cookie. An unset mode becomes SameSite=None on a secure cookie, so that the browser sends the cook
samlsp/request_tracker_cookie.go:120
↓ 2 callers
Function
samlResponse
samlResponse returns the decoded SAMLResponse posted by body.
samlidp/force_authn_passive_test.go:101
↓ 2 callers
Method
scheduleSessionDeletion
scheduleSessionDeletion arranges for session to be deleted once it has been expired for expiredSessionRetention.
samlidp/session_expiry.go:66
↓ 2 callers
Method
send
send sends the LogoutRequest and checks the LogoutResponse.
identity_provider_logout_soap.go:107
↓ 2 callers
Method
sendStatusError
sendStatusError sends the error Response statusErr describes, and reports an HTTP 500 error through onError if it cannot.
identity_provider_error_response.go:139
↓ 2 callers
Function
sentLogoutResponse
sentLogoutResponse returns the LogoutResponse that resp sends the IDP with binding. A SimpleSign response is checked to be signed by the SP.
samlsp/front_channel_partial_logout_test.go:39
↓ 2 callers
Function
sessionEnd
sessionEnd returns the moment the security context established by assertion must end: the earliest SessionNotOnOrAfter of its AuthnStatements, allowin
samlsp/session_jwt.go:113
↓ 2 callers
Function
sessionKey
sessionKey returns the key that signs session and tracked-request JWTs.
samlsp/new.go:235
↓ 2 callers
Method
setLogoutStateCookie
setLogoutStateCookie writes state to the logout state cookie. A browser would silently drop a cookie that is too large, and the logout would then sto
identity_provider_logout_propagation.go:931
↓ 2 callers
Method
setService
setService registers metadata as the service stored as id. The caller must hold idpConfigMu for writing.
samlidp/service.go:279
↓ 2 callers
Function
setStateCookie
(t *testing.T, idp *IdentityProvider, state *logoutState)
idp_review_logout_state_test.go:54
↓ 2 callers
Function
sidAttribute
sidAttribute returns a standalone saml:Attribute element named name with one value.
subject_identifiers_test.go:47
↓ 2 callers
Method
signElement
signElement signs el with the SP's key and returns it serialized.
identity_provider_logout_test.go:567
↓ 2 callers
Function
signLargeAssertion
signLargeAssertion signs largeAssertion and moves the Signature to follow Issuer, where the SAML schema places it and where IdPs send it.
signature_size_test.go:69
↓ 2 callers
Function
signingCertificates
(ed *saml.EntityDescriptor)
samlidp/metadata_options_test.go:32
↓ 2 callers
Method
simpleSignIDPForm
simpleSignIDPForm returns the form of an HTTP-POST-SimpleSign message carrying el in messageParam, signed by the IDP's key.
samlsp/simplesign_logout_test.go:194
↓ 2 callers
Method
simpleSignResponseXML
simpleSignResponse returns a valid Response for e.sp whose assertion is not signed.
simplesign_binding_test.go:163
↓ 2 callers
Function
simpleSignTestOptions
(t *testing.T)
samlsp/simplesign_test.go:24
↓ 2 callers
Function
soapEnvelope
soapEnvelope returns el signed with key and cert (with signatureMethod) and wrapped in a SOAP envelope, or not signed if key is nil.
samlsp/middleware_soap_logout_test.go:122
↓ 2 callers
Method
soapLogout
soapLogout sends req to the IdP's /slo with the SOAP binding, without the browser's cookies, and returns the LogoutResponse, after checking its signat
samlidp/logout_soap_test.go:129
↓ 2 callers
Method
soapSignature
soapSignature signs el, a message for the SOAP binding, with Key and SignatureMethod (or, when that is empty, SHA-256 for the type of Key), and return
service_provider_soap_logout.go:169
↓ 2 callers
Method
sp
(entityID string)
identity_provider_logout_propagation_test.go:130
↓ 2 callers
Function
spKeyDescriptorCerts
(t *testing.T, md *EntityDescriptor)
service_provider_encryption_key_test.go:38
↓ 2 callers
Function
spcovBrokenKey
spcovBrokenKey returns an *rsa.PrivateKey that passes type checks but whose private operations fail (N does not equal P*Q).
sp_coverage_helpers_test.go:222
↓ 2 callers
Function
spcovColonHex
(b []byte)
sp_coverage_test.go:316
↓ 2 callers
Function
spcovLogoutValidators
spcovLogoutValidators runs a check against both the POST and the Redirect variant.
sp_coverage_parse_test.go:700
↓ 2 callers
Function
specProfAuthnRequest
specProfAuthnRequest returns a validated IdpAuthnRequest for an HTTP-Redirect AuthnRequest from test.SP.
samlidp/spec_profiles_test.go:29
↓ 2 callers
Function
specProfServerTest
specProfServerTest returns NewServerTest(t), restoring the package globals it replaces when the test ends.
samlidp/spec_profiles_test.go:20
↓ 2 callers
Function
specRawParams
specRawParams splits a raw query string into its parameters, in order, without decoding them.
spec_bindings_test.go:49
↓ 2 callers
Method
specSigIDPResponse
specSigIDPResponse has an IdentityProvider issue a Response for e's SP, encrypting the assertion when encrypt is set.
spec_signature_encryption_test.go:199
↓ 2 callers
Method
startFrontChannelLogout
startFrontChannelLogout sends the browser to the IDP with a LogoutRequest for nameID, over the binding sloBinding picks, and deletes the local session
samlsp/middleware_logout.go:147
↓ 2 callers
Method
strictACSBinding
strictACSBinding reports whether the request's ProtocolBinding must match the Binding of the endpoint at its AssertionConsumerServiceURL: when it has
identity_provider.go:1246
↓ 2 callers
Function
stripKeyInfoWithoutCertificate
stripKeyInfoWithoutCertificate removes the KeyInfo from el's Signature when it carries no X509Certificate, so that dsig verifies against the trusted c
service_provider.go:2572
↓ 2 callers
Function
stripPadding
stripPadding removes XML Encryption padding (section 5.2): the last byte holds the number of padding bytes, between 1 and the block size, and the othe
xmlenc/cbc.go:202
↓ 2 callers
Function
testAttributeQuery
()
schema_attribute_query_test.go:13
↓ 2 callers
Function
testMakeResponse
(t *testing.T, test *IdentityProviderTest)
identity_provider_test.go:892
↓ 2 callers
Method
trackLogoutRequest
trackLogoutRequest tracks a LogoutRequest with the given ID, as HandleStartLogout does, and returns the tracking cookie.
samlsp/middleware_logout_test.go:151
↓ 2 callers
Function
unboundedParentContext
unboundedParentContext is etreeutils.NSBuildParentContext without the default context's 1000-node traversal budget (GHSA-qhrp-hfff-vphr). That budget
service_provider.go:2555
↓ 2 callers
Function
unsignedResponseWith
(e *spcovEnv, encrypted *etree.Element)
cbc_integrity_test.go:59
↓ 2 callers
Method
validateAssertionInResponseTo
validateAssertionInResponseTo checks the InResponseTo of an assertion's SubjectConfirmationData against the IDs of the requests this SP made. With Al
service_provider.go:2293
← previous
next →
701–800 of 2,436, ranked by callers