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
↓ 1 callers
Method
parseSOAPLogoutResponse
(soapResponseXML []byte, req *LogoutRequest, now time.Time)
service_provider_soap_logout.go:336
↓ 1 callers
Method
parseSimpleSignResponse
parseSimpleSignResponse validates a Response received at the ACS with the HTTP-POST-SimpleSign binding. The SimpleSign signature is checked before any
service_provider.go:1578
↓ 1 callers
Function
pathOrDefault
(path, defaultPath string)
samlsp/new.go:449
↓ 1 callers
Method
postLogoutResponse
postLogoutResponse sends the IDP a LogoutResponse to the LogoutRequest logoutRequestID, with status, in an auto-submitting form, with the HTTP-POST or
samlsp/middleware_logout.go:363
↓ 1 callers
Function
postRequestXML
postRequestXML returns an HTTP-POST binding request to test's IdP that carries requestXML.
idp_review_authn_signature_test.go:150
↓ 1 callers
Method
propagateLogout
propagateLogout continues the handling of the valid LogoutRequest req, for which the IdP session has been ended, by sending a LogoutRequest to each of
identity_provider_logout_propagation.go:217
↓ 1 callers
Function
randomHex
(t *testing.T, n int)
idp_review_logout_state_test.go:20
↓ 1 callers
Function
rawSignedRedirectURL
rawSignedRedirectURL returns destination with an HTTP-Redirect binding query for message whose RelayState is rawRelayState exactly as given (not escap
idp_review_relay_state_test.go:16
↓ 1 callers
Function
readAttributeQuery
(t *testing.T, r *http.Request)
samlsp/middleware_attribute_query_test.go:163
↓ 1 callers
Function
readCert
(path string)
testdata/entra_id_gen/main.go:219
↓ 1 callers
Function
readCertificate
readCertificate reads a PEM encoded certificate from path.
example/service.go:184
↓ 1 callers
Function
readLogoutResponseMessage
readLogoutResponseMessage returns the XML of the LogoutResponse r carries, with the HTTP-Redirect binding (and then also the parsed query, whose signa
identity_provider_logout_propagation.go:749
↓ 1 callers
Method
readLogoutState
readLogoutState returns the state of the logout in progress, from its cookie.
identity_provider_logout_propagation.go:890
↓ 1 callers
Function
readSOAPLogoutRequest
readSOAPLogoutRequest reads the body of r, at most MaxSOAPLogoutMessageSize bytes, as a SOAP 1.1 envelope, and returns the samlp:LogoutRequest its Bod
identity_provider_logout_soap_request.go:39
↓ 1 callers
Method
redirectBindingCerts
redirectBindingCerts returns the IDP certificates that may have produced an HTTP-Redirect binding signature. It follows the same configuration rules a
redirect_binding.go:155
↓ 1 callers
Function
redirectECDSAKeyPair
redirectECDSAKeyPair returns a P-256 key and a self-signed certificate for it that is valid at spcovNow.
simplesign_binding_test.go:460
↓ 1 callers
Function
redirectRequestID
redirectRequestID returns the ID of the LogoutRequest sent by u with the HTTP-Redirect binding, and checks that it carries an EncryptedID and no NameI
logout_request_identifiers_test.go:63
↓ 1 callers
Method
redirectToSLO
redirectToSLO sends el, a message from the IDP, to the SLO endpoint as a SAMLRequest with the HTTP-Redirect binding, signed by the IDP, with the Relay
samlsp/front_channel_revocation_test.go:29
↓ 1 callers
Function
registerWithIDP
registerWithIDP uploads the service provider's metadata to the example identity provider's /services API.
example/service.go:296
↓ 1 callers
Function
removeDestinationFromDocument
(doc *etree.Document)
service_provider_test.go:1118
↓ 1 callers
Function
requestSubjectIdentifierStatusError
requestSubjectIdentifierStatusError returns the status for a request Subject whose identifier cannot be compared with the asserted Subject's, or nil i
identity_provider_request_subject.go:80
↓ 1 callers
Function
requestedAttrMatches
requestedAttrMatches reports whether an attribute of the asserted NameID matches the requested one, which matches anything when it is empty.
identity_provider_request_subject.go:122
↓ 1 callers
Method
reset
(token, sentinel []byte)
internal/xmlroundtrip/validate.go:243
↓ 1 callers
Method
revokeLoggedOutSession
revokeLoggedOutSession ends, on the server, the session the user is logging out of, when Session can do so (see SessionTerminator): deleting the cooki
samlsp/middleware_logout.go:124
↓ 1 callers
Function
sanitizeAttributesForUnmarshal
sanitizeAttributesForUnmarshal rewrites root, in place, so that encoding/xml cannot read an attribute field from anything other than the unqualified a
unmarshal_untrusted.go:40
↓ 1 callers
Function
schemacovStatus
()
schema_coverage_test.go:267
↓ 1 callers
Method
seedSessionExpiry
seedSessionExpiry schedules the deletion of the sessions already in the Store, other than skipID (which the caller schedules), the first time it is ca
samlidp/session_expiry.go:75
↓ 1 callers
Method
selectACSEndpointByURL
selectACSEndpointByURL selects the ACS endpoint at acsURL, and reports whether there is one. When StrictACSBinding is set and the request has a Proto
identity_provider.go:1264
↓ 1 callers
Method
sendLogoutRequest
sendLogoutRequest sends the browser with a signed LogoutRequest for participant to its HTTP-Redirect or HTTP-POST SingleLogoutService, as listed in me
identity_provider_logout_propagation.go:380
↓ 1 callers
Method
sendLogoutRequest
sendLogoutRequest sends logoutRequest to the IDP with binding.
samlsp/middleware_logout.go:188
↓ 1 callers
Method
sendSOAPLogoutRequest
sendSOAPLogoutRequest sends the IDP a LogoutRequest for nameID with the SOAP binding and the context of r, and returns an error unless the IDP answere
samlsp/middleware_soap_start_logout.go:68
↓ 1 callers
Method
serveLogoutResponse
serveLogoutResponse handles a LogoutResponse sent by a service provider to which the IdP sent a LogoutRequest while propagating a logout, and continue
identity_provider_logout_propagation.go:619
↓ 1 callers
Method
serveSLORequest
(w http.ResponseWriter, r *http.Request)
samlsp/middleware_logout.go:326
↓ 1 callers
Method
serveSLOResponse
(w http.ResponseWriter, r *http.Request)
samlsp/middleware_logout.go:290
↓ 1 callers
Method
serveSOAPLogoutRequest
serveSOAPLogoutRequest handles a LogoutRequest sent to ServeSLO with the SOAP binding. See ServeSLO.
identity_provider_logout_soap_request.go:79
↓ 1 callers
Method
serveSOAPLogoutRequest
serveSOAPLogoutRequest answers a LogoutRequest sent by the IDP with the SOAP binding.
samlsp/middleware_soap_logout.go:17
↓ 1 callers
Function
sessionCookieHeaders
sessionCookieHeaders returns how many Set-Cookie headers of resp are for the session cookie.
samlsp/soap_start_logout_test.go:188
↓ 1 callers
Method
sessionLifetime
sessionLifetime returns how long a session issued now may be accepted.
samlsp/session_revocation.go:198
↓ 1 callers
Function
sessionParticipantKey
sessionParticipantKey is the key participant is recorded under: the same participant always has the same key, so recording it again changes nothing.
samlidp/logout_propagation.go:34
↓ 1 callers
Method
sessionParticipants
sessionParticipants returns the distinct participants of the sessions match selects, leaving out those of the service provider exclude. tracked is fal
identity_provider_logout_propagation.go:103
↓ 1 callers
Method
sessionSAMLNameID
sessionSAMLNameID returns the full NameID of the request's session.
samlsp/middleware_attribute_query.go:46
↓ 1 callers
Function
setNameIDClaims
setNameIDClaims records the Format, NameQualifier and SPNameQualifier of nameID in claims, so that GetSAMLNameID can rebuild it. An omitted Format is
samlsp/session_jwt.go:130
↓ 1 callers
Function
sigRefProfileMetadata
sigRefProfileMetadata returns IdP metadata trusting cert as an element, with the given ID ("" for none).
signature_reference_profile_test.go:124
↓ 1 callers
Function
signWithCryptoSigner
signWithCryptoSigner signs token using only the crypto.Signer interface, so that keys whose private material is not available in process (KMS, HSM) ca
samlsp/jwt_signer.go:72
↓ 1 callers
Function
signatureMethodOf
(t *testing.T, root *etree.Element)
sp_signed_metadata_test.go:44
↓ 1 callers
Function
signatureOf
signatureOf signs el with signingContext and returns the enveloped Signature element.
service_provider_soap_logout.go:183
↓ 1 callers
Method
signatureVerificationCerts
signatureVerificationCerts returns the IdP certificates that a signature on el may be made with: from the IdP metadata, the configured fingerprint or
service_provider.go:2771
↓ 1 callers
Function
signedLogoutResponseStatus
signedLogoutResponseStatus checks the enveloped XML signature of the LogoutResponse in buf with verifier and returns the status it covers.
logout_response_status_test.go:145
↓ 1 callers
Function
signedRedirectSSORequest
signedRedirectSSORequest returns an HTTP-Redirect AuthnRequest to the IdP whose query string is signed, with the given Destination.
xhtml_forms_test.go:182
↓ 1 callers
Method
signsMessages
signsMessages reports whether the SP signs messages the IdP must verify with the certificate in the SP metadata, so that the metadata must publish it
service_provider.go:1058
↓ 1 callers
Method
simpleSignCertByFingerprint
simpleSignCertByFingerprint returns the certificate in the KeyInfo form control of m if its fingerprint matches IDPCertificateFingerprint.
simplesign_binding.go:205
↓ 1 callers
Method
simpleSignCerts
simpleSignCerts returns the IDP certificates that may have produced the SimpleSign signature of m.
simplesign_binding.go:195
↓ 1 callers
Method
simpleSignSigningContext
simpleSignSigningContext returns the signing context the service provider uses for the HTTP-POST-SimpleSign binding, which requires signing, with sign
simplesign_binding.go:331
↓ 1 callers
Method
sloEndpoint
sloEndpoint returns the SingleLogoutService endpoint of the service provider to send the LogoutResponse to. It prefers an endpoint with the binding th
identity_provider_logout.go:351
↓ 1 callers
Method
soapLogoutEndpoint
soapLogoutEndpoint returns the first SingleLogoutService of metadata with the SOAP binding and an https Location (or an http one, if AllowInsecureSOAP
identity_provider_logout_soap.go:32
↓ 1 callers
Method
soapLogoutIDP
soapLogoutIDP returns this repository's IdentityProvider with the IdP key and certificate the SP of e trusts.
service_provider_soap_logout_test.go:25
↓ 1 callers
Method
soapLogoutNameID
soapLogoutNameID returns the NameID to send the IDP a LogoutRequest for session with the SOAP binding, and whether that binding is to be used: LogoutB
samlsp/middleware_soap_start_logout.go:27
↓ 1 callers
Method
soapLogoutSP
soapLogoutSP serves the SLO URL of e's SP: it answers a valid SOAP LogoutRequest with a signed Success LogoutResponse and anything else with a SOAP Fa
service_provider_soap_logout_test.go:55
↓ 1 callers
Function
soapLogoutTestKeyPair
(t *testing.T)
samlsp/middleware_soap_logout_test.go:274
↓ 1 callers
Function
soapResponseElement
soapResponseElement parses soapResponseXML as a SOAP 1.1 envelope and returns the samlp:Response that must be the only element of its Body.
service_provider_attribute_query.go:329
↓ 1 callers
Method
spAnswer
spAnswer has sp validate the LogoutRequest in r and returns the browser's request carrying its LogoutResponse to the IdP, with the IdP binding sp pref
identity_provider_logout_propagation_test.go:201
↓ 1 callers
Function
spEncryptionMethods
spEncryptionMethods returns the EncryptionMethods the test SP lists for its encryption key.
identity_provider_assertion_encrypter_test.go:47
↓ 1 callers
Function
spEntities
spEntities returns the entities with an SPSSODescriptor in entities and in any EntitiesDescriptor nested in it.
samlidp/util.go:118
↓ 1 callers
Method
spFor
(r *http.Request)
samlidp/logout_propagation_test.go:87
↓ 1 callers
Function
spSigningKeyDescriptors
(sp *ServiceProvider)
sp_review_metadata_signing_key_test.go:11
↓ 1 callers
Function
spSignsAuthnRequests
spSignsAuthnRequests reports whether a service provider's metadata says it signs its AuthnRequests: AuthnRequestsSigned="true" on one of its SPSSODesc
identity_provider_authn_signature.go:106
↓ 1 callers
Function
specProfLogoutRequestForm
specProfLogoutRequestForm returns the base64 HTTP-POST form value of a LogoutRequest from the IdP to e.sp, signed by the IdP if sign is set.
spec_profiles_test.go:559
↓ 1 callers
Function
specProfXSIType
specProfXSIType returns the xsi:type of el.
spec_profiles_test.go:727
↓ 1 callers
Function
specWrap
specWrap inserts CRLF line breaks every n characters of s, as a sender that line-wraps base64 would.
spec_bindings_test.go:61
↓ 1 callers
Method
startSOAPLogout
startSOAPLogout sends the IDP a LogoutRequest for nameID with the SOAP binding, deletes the local session whatever the outcome, and redirects the brow
samlsp/middleware_soap_start_logout.go:45
↓ 1 callers
Function
stateCookie
(value string)
identity_provider_logout_propagation_test.go:562
↓ 1 callers
Method
storedServiceEntityID
storedServiceEntityID returns the entity ID of the service stored as id, if there is one. The caller must hold servicesMu.
samlidp/service.go:263
↓ 1 callers
Function
stripJSONSignatures
stripJSONSignatures removes the non-null "Signature" members from the JSON-encoded Metadata of a Service. It returns nil if there were none.
samlidp/service.go:84
↓ 1 callers
Function
subjectConfirmationsMatchRequest
subjectConfirmationsMatchRequest reports whether the asserted Subject can be confirmed in a manner one of the requested SubjectConfirmations describes
identity_provider_request_subject.go:130
↓ 1 callers
Method
submitLoginForm
submitLoginForm fills in the login form in body with alice's credentials and posts it.
samlidp/force_authn_passive_test.go:83
↓ 1 callers
Method
terminateFrontChannelSessions
terminateFrontChannelSessions ends the sessions that logoutRequest, a LogoutRequest the IDP sent through the browser, names with Session, if it implem
samlsp/middleware_soap_logout.go:84
↓ 1 callers
Method
terminateSessions
terminateSessions ends the sessions logoutRequest names with Session, if it implements SessionTerminator.
samlsp/middleware_soap_logout.go:48
↓ 1 callers
Function
testIDPEntity
(entityID string)
samlsp/fetch_metadata_test.go:158
↓ 1 callers
Function
testSPEntity
(entityID string)
samlsp/fetch_metadata_test.go:152
↓ 1 callers
Function
tokensEqual
tokensEqual reports whether after, the result of encoding and decoding before, is the same token.
internal/xmlroundtrip/validate.go:268
↓ 1 callers
Function
undoEncoderNamespaces
undoEncoderNamespaces undoes, in after, the namespace declarations that xml.Encoder adds when it encodes before. RawToken leaves a prefix in Name.Spa
internal/xmlroundtrip/validate.go:315
↓ 1 callers
Method
unmarshalLegacyJSON
unmarshalLegacyJSON decodes a Service stored without RawMetadata.
samlidp/service.go:68
↓ 1 callers
Method
unsupportedBindingStatusError
unsupportedBindingStatusError returns the error status ServeSSO answers with when the IdP cannot send a Response to the assertion consumer service the
identity_provider_error_response.go:194
↓ 1 callers
Function
untrustedKeyAndCertificate
untrustedKeyAndCertificate returns a new RSA key and a self-signed certificate for it.
samlidp/signed_sp_metadata_test.go:71
↓ 1 callers
Method
validateAttributeQueryResponse
validateAttributeQueryResponse checks the Response to query, apart from its signature and assertions.
service_provider_attribute_query.go:375
↓ 1 callers
Method
validateBearerSubjectConfirmationData
validateBearerSubjectConfirmationData checks the SubjectConfirmationData of one bearer SubjectConfirmation (saml-profiles §4.1.4.3).
service_provider.go:2473
↓ 1 callers
Method
validateBearerSubjectConfirmations
nolint:gosec // not a credential validateBearerSubjectConfirmations checks the bearer SubjectConfirmations of subject. The Web Browser SSO profile req
service_provider.go:2451
↓ 1 callers
Method
validateDestination
validateDestination checks the Destination of the request. A message signed for the HTTP-Redirect or HTTP-POST binding must carry a Destination, and i
identity_provider_logout.go:334
↓ 1 callers
Method
validateFields
validateFields checks the fields of the (authenticated) request.
identity_provider_logout.go:299
↓ 1 callers
Method
validateLogoutRequestRedirectQuery
validateLogoutRequestRedirectQuery validates a LogoutRequest received via the HTTP-Redirect binding. rawQuery is the URL's raw query string.
service_provider.go:3616
↓ 1 callers
Method
validateLogoutRequestSimpleSign
validateLogoutRequestSimpleSign validates a LogoutRequest received via the HTTP-POST-SimpleSign binding. Its SimpleSign signature must be valid.
service_provider.go:3558
↓ 1 callers
Method
validateLogoutResponse
validateLogoutResponse checks that the LogoutResponse r carries answers the outstanding LogoutRequest of state, and is signed by the service provider
identity_provider_logout_propagation.go:642
↓ 1 callers
Method
validateLogoutResponseFields
validateLogoutResponseFields checks the fields of an authenticated LogoutResponse that answers the LogoutRequest requestID, which was sent through the
identity_provider_logout_propagation.go:717
↓ 1 callers
Function
validateQuerySubjectConfirmations
validateQuerySubjectConfirmations checks the SubjectConfirmationData of subject, if any, against the time and the ID of the attribute query.
service_provider_attribute_query.go:545
↓ 1 callers
Method
validateSOAPLogoutResponse
(resp *LogoutResponse, req *LogoutRequest, now time.Time)
service_provider_soap_logout.go:361
↓ 1 callers
Method
validateSignatureUnclassified
(el *etree.Element, metadataCerts func() ([]*x509.Certificate, error))
service_provider.go:2644
↓ 1 callers
Method
validateSubjectIdentifier
validateSubjectIdentifier makes sure subject identifies the principal. The Subject of a login assertion is the principal the SP establishes a session
service_provider.go:2056
↓ 1 callers
Method
validationErrorResponse
validationErrorResponse returns the error status ServeSSO answers with for an AuthnRequest that Validate rejected with err, or nil if the request must
identity_provider_error_response.go:150
↓ 1 callers
Method
validationStatusError
validationStatusError returns the error status ServeSSO answers with, when SendErrorResponses is set, for an AuthnRequest that Validate rejected with
identity_provider_error_response.go:217
↓ 1 callers
Method
verifyEnvelopedSignature
verifyEnvelopedSignature checks the enveloped XML signature of the request and reads Request again from what it covers.
identity_provider_authn_signature.go:71
← previous
next →
1,001–1,100 of 2,436, ranked by callers