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
↓ 14 callers
Method
signedIDPMessage
signedIDPMessage returns the base64 encoding of el, signed by the IDP.
samlsp/middleware_logout_test.go:123
↓ 14 callers
Function
soapEnvelope
soapEnvelope returns a SOAP 1.1 Envelope whose Body holds el.
soap.go:106
↓ 13 callers
Method
AllSessionIndexes
AllSessionIndexes returns every SessionIndex of the request: SessionIndex, if set, followed by AdditionalSessionIndexes.
schema.go:180
↓ 13 callers
Method
Post
Post returns an HTML form suitable for using the HTTP-POST binding with the request
service_provider.go:1197
↓ 13 callers
Method
Validate
Validate checks that the logout request is well formed, was issued by a known service provider, is signed by that service provider, and is addressed t
identity_provider_logout.go:184
↓ 13 callers
Method
Write
([]byte)
samlsp/middleware_coverage_test.go:24
↓ 13 callers
Method
makeTrackedRequest
(id string)
samlsp/middleware_test.go:119
↓ 13 callers
Function
newSOAPLogoutApp
(t *testing.T)
samlsp/middleware_soap_logout_test.go:41
↓ 13 callers
Function
newSOAPLogoutTest
(t *testing.T)
identity_provider_logout_soap_request_test.go:28
↓ 13 callers
Method
now
now returns the current time as seen by this IdentityProvider. idp may be nil, in which case the default clock is used.
identity_provider.go:512
↓ 13 callers
Function
specSigSign
specSigSign returns a copy of el carrying an enveloped ds:Signature built by hand, so that tests can produce signatures whose SignedInfo deviates from
spec_signature_encryption_test.go:68
↓ 12 callers
Function
DefaultServiceProvider
DefaultServiceProvider returns the default saml.ServiceProvider for the provided options.
samlsp/new.go:383
↓ 12 callers
Function
New
New returns a new Server
samlidp/samlidp.go:147
↓ 12 callers
Function
NewIdpLogoutRequest
NewIdpLogoutRequest returns a new IdpLogoutRequest for the given HTTP request to the single logout service. A GET request is decoded as an HTTP-Redire
identity_provider_logout.go:100
↓ 12 callers
Method
Public
()
crypto_signer_test.go:26
↓ 12 callers
Method
artifactResponseEl
artifactResponseEl builds an ArtifactResponse (optionally signed) wrapping an unsigned Response with an unsigned Assertion.
sp_coverage_parse_test.go:196
↓ 12 callers
Function
checkStatus
checkStatus checks the top-level and second-level status of resp.
identity_provider_logout_soap_request_test.go:91
↓ 12 callers
Function
formFields
formFields returns the action and the hidden fields of an HTML form.
simplesign_binding_test.go:71
↓ 12 callers
Method
get
get requests /app with cookie and returns the status code.
samlsp/middleware_soap_logout_test.go:80
↓ 12 callers
Function
idpErrResponseFromForm
idpErrResponseFromForm returns the Response element posted by the HTML form in body, and the form's action and fields.
idp_error_response_test.go:39
↓ 12 callers
Method
logoutRequest
logoutRequest returns an unsigned LogoutRequest from the SP to the IdP.
identity_provider_logout_test.go:104
↓ 12 callers
Function
randomBytes
nolint:unparam // This always receives 20, but we want the option to do more or less if needed.
util.go:64
↓ 12 callers
Function
schemacovString
schemacovString serializes el as a document root and returns the XML text.
schema_coverage_test.go:26
↓ 12 callers
Method
serveIDP
serveIDP sends r to the IdP's ServeSLO with the browser's IdP cookies.
identity_provider_logout_propagation_test.go:187
↓ 12 callers
Function
sessionKey
(id string)
samlidp/logout.go:111
↓ 12 callers
Method
signingContext
signingContext returns a signing context for the SP's key and certificate that signs with signatureMethod.
service_provider.go:1085
↓ 11 callers
Method
Close
()
samlsp/samlsp_coverage_test.go:66
↓ 11 callers
Method
MakeAssertionEl
MakeAssertionEl sets `AssertionEl` to a signed, possibly encrypted, version of `Assertion`.
identity_provider.go:1667
↓ 11 callers
Method
MakeLogoutResponse
MakeLogoutResponse produces a new LogoutResponse object for idpURL and logoutRequestID, with the status Success. If sp.SignatureMethod is set, the res
service_provider.go:3086
↓ 11 callers
Function
NewMemoryReplayCache
NewMemoryReplayCache returns a MemoryReplayCache that holds at most maxEntries unexpired assertion IDs. It panics if maxEntries is not positive.
samlsp/replay_cache.go:54
↓ 11 callers
Method
TrackRequest
TrackRequest starts tracking the SAML request with the given ID. It returns an `index` that should be used as the RelayState in the SAMl request flow.
samlsp/request_tracker.go:19
↓ 11 callers
Method
WriteHeader
(int)
samlsp/middleware_soap_logout.go:71
↓ 11 callers
Function
clockNow
clockNow returns the current time from clock or, if it is nil, from the deprecated saml.TimeNow, which callers that have not set a Clock may still rep
samlsp/util.go:15
↓ 11 callers
Method
cookie
cookie returns a session cookie for nameID, issued at issuedAt, with the given SessionIndexes, as JWTSessionCodec makes it.
samlsp/middleware_soap_logout_test.go:61
↓ 11 callers
Function
covLoginRequest
(body string)
samlidp/session_coverage_test.go:21
↓ 11 callers
Function
covRSAKey
(t *testing.T)
samlsp/samlsp_coverage_test.go:45
↓ 11 callers
Function
findChildren
findChildren returns all the elements matching childNS/childTag that are direct children of parentEl. The namespace context of parentEl is built once
service_provider.go:3692
↓ 11 callers
Function
formatTime
formatTime formats t for a SAML message. saml-core §1.3.3 says SAML time values "MUST be expressed in UTC form, with no time zone component", so t is
time.go:15
↓ 11 callers
Function
idpErrCheckErrorResponse
idpErrCheckErrorResponse checks that el is a signed Response from the IdP with the given status codes and no assertion.
idp_error_response_test.go:51
↓ 11 callers
Method
logoutResponse
()
sp_coverage_helpers_test.go:150
↓ 11 callers
Method
makeUnsignedLogoutResponse
(idpURL, logoutRequestID string)
service_provider.go:3107
↓ 11 callers
Function
newSaferFlateReader
1 MiB
flate.go:17
↓ 11 callers
Method
sessionExists
(t *testing.T, id string)
samlidp/logout_test.go:78
↓ 11 callers
Function
soapBodyElement
soapBodyElement parses soapXML as a SOAP 1.1 envelope and returns the SAML protocol element named tag (such as "Response" or "LogoutRequest") that mus
soap.go:180
↓ 11 callers
Function
soapEnvelopeBytes
soapEnvelopeBytes wraps the LogoutRequest req in a SOAP 1.1 envelope, as a service provider sends it with the SOAP binding (saml-bindings §3.2).
identity_provider_logout_soap_request_test.go:51
↓ 11 callers
Function
specCoreSignedResponse
specCoreSignedResponse returns a Response signed by the IDP that carries a (plaintext, unsigned) assertion. mutate, if set, edits the Assertion elemen
spec_core_assertions_test.go:26
↓ 11 callers
Function
unmarshalForTest
unmarshalForTest parses doc and reads its root into v the way the service provider reads a message it received.
attribute_namespace_test.go:17
↓ 10 callers
Method
Element
Element returns an XML element representation of n.
service_provider.go:44
↓ 10 callers
Method
WriteResponse
WriteResponse writes the HTTP response carrying the SAML response for req. req.ResponseEl is nil until req.MakeResponse (or req.PostBinding, which cal
identity_provider.go:132
↓ 10 callers
Function
acsselNewTest
acsselNewTest returns an IdP test whose service provider's metadata lists acs as its assertion consumer services, and a pointer that is set to true wh
idp_acs_selection_test.go:34
↓ 10 callers
Method
build
(t *testing.T)
redirect_binding_test.go:40
↓ 10 callers
Function
idpcovSSORequest
(t *testing.T, test *IdentityProviderTest)
idp_coverage_test.go:83
↓ 10 callers
Method
login
login logs the IdP session in to each of sps with IdP-initiated SSO, which records them as participants.
identity_provider_logout_propagation_test.go:151
↓ 10 callers
Method
post
post sends body to the SLO endpoint with the given Content-Type, as the IdP does with the SOAP binding, and returns the response.
samlsp/middleware_soap_logout_test.go:95
↓ 10 callers
Function
postRequestBytes
(target string, buf []byte)
identity_provider_logout_test.go:127
↓ 10 callers
Function
redirectRequest
(sp *ServiceProvider, rawQuery string)
redirect_binding_test.go:99
↓ 10 callers
Function
reqSubjNewTest
reqSubjNewTest returns an IdP test whose session is alice@example.com, with the emailAddress NameID Format.
idp_request_subject_test.go:23
↓ 10 callers
Method
signedPostRequest
(t *testing.T, req *LogoutRequest)
identity_provider_logout_test.go:137
↓ 10 callers
Function
spRequestForResponse
spRequestForResponse turns the IdP's HTTP response into the request the browser sends to the SP.
identity_provider_logout_test.go:154
↓ 10 callers
Method
validatedElement
validatedElement is validateSignature, returning on success the element to read the message from: what the signature covers, parsed from the canonical
service_provider.go:2621
↓ 9 callers
Function
FetchMetadata
FetchMetadata returns metadata from an IDP metadata URL. If httpClient is nil, a client with a two-minute timeout is used. Only a 2xx response is acc
samlsp/fetch_metadata.go:265
↓ 9 callers
Method
KeySize
()
xmlenc/xmlenc.go:110
↓ 9 callers
Method
MakeRedirectLogoutRequest
MakeRedirectLogoutRequest creates a SAML LogoutRequest using the HTTP-Redirect binding. It returns a URL that we will redirect the user to in order to
service_provider.go:2958
↓ 9 callers
Method
MakeRedirectLogoutResponse
MakeRedirectLogoutResponse creates a SAML LogoutResponse using the HTTP-Redirect binding. It returns a URL that we will redirect the user to for Logou
service_provider.go:3135
↓ 9 callers
Method
NewIdpInitiatedRequest
NewIdpInitiatedRequest returns the IdpAuthnRequest for an IdP-initiated login to the service provider serviceProviderID, with its metadata and its def
identity_provider.go:899
↓ 9 callers
Function
ParseMetadata
ParseMetadata parses arbitrary SAML IDP metadata. Note: this is needed because IDP metadata is sometimes wrapped in an <EntitiesDescriptor>, and some
samlsp/fetch_metadata.go:47
↓ 9 callers
Method
ParseXMLArtifactResponse
ParseXMLArtifactResponse validates the SAML Artifact resolver response and returns the verified assertion. This function handles verifying the digita
service_provider.go:1444
↓ 9 callers
Method
SimpleSign
SimpleSign returns an auto-submitting HTML form that sends the request to its Destination with the HTTP-POST-SimpleSign binding, signed with sp's Key
simplesign_binding.go:400
↓ 9 callers
Method
ValidateLogoutResponseRequest
ValidateLogoutResponseRequest validates the LogoutResponse content from the request, which may use the HTTP-Redirect, HTTP-POST or HTTP-POST-SimpleSig
service_provider.go:3315
↓ 9 callers
Function
acsselRequest
acsselRequest returns an HTTP-Redirect AuthnRequest from test.SP for the ACS at acsURL with protocolBinding, after mutate (if not nil) has changed it.
idp_acs_selection_test.go:58
↓ 9 callers
Method
deleteSession
deleteSession deletes the stored session id and its participants.
samlidp/logout_propagation.go:118
↓ 9 callers
Function
formPost
formPost returns a same-origin POST of form to uri.
samlsp/form_replay_test.go:44
↓ 9 callers
Method
idpSOAP
idpSOAP returns req signed by the IdP in a SOAP envelope.
samlsp/middleware_soap_logout_test.go:143
↓ 9 callers
Function
idpcovRequest
idpcovRequest returns a request ready for MakeAssertion / MakeAssertionEl / MakeResponse, without going through Validate.
idp_coverage_test.go:94
↓ 9 callers
Method
logoutRequest
logoutRequest returns a LogoutRequest from sp for the test session, signed by sp unless sp has no SignatureMethod. modify, if set, changes it before i
identity_provider_logout_soap_request_test.go:37
↓ 9 callers
Method
logoutSignatureMethod
logoutSignatureMethod returns the signature method for the logout messages the SP sends: LogoutSignatureMethod, or SignatureMethod if that is empty. A
service_provider.go:1076
↓ 9 callers
Function
marshalAndParse
marshalAndParse marshals v and parses the result with etree, failing on the junk encoding/xml produces for a raw *etree.Element.
metadata_signature_test.go:36
↓ 9 callers
Function
newForceAuthnPassiveTest
(t *testing.T)
samlidp/force_authn_passive_test.go:32
↓ 9 callers
Function
parseSimpleSignRequest
parseSimpleSignRequest reads the HTTP-POST-SimpleSign message carried in messageParam (SAMLRequest or SAMLResponse) of the posted form of req. It retu
simplesign_binding.go:119
↓ 9 callers
Function
reqSubjServe
reqSubjServe sends an AuthnRequest from test.SP with the given Subject to ServeSSO with the HTTP-Redirect binding, and returns the request ID and the
idp_request_subject_test.go:48
↓ 9 callers
Method
requests
()
samlidp/logout_soap_test.go:106
↓ 9 callers
Method
run
run answers each LogoutRequest the IdP sends to an SP until the IdP sends something else, and returns that last IdP response.
samlidp/logout_propagation_test.go:99
↓ 9 callers
Method
soapLogoutRequest
soapLogoutRequest returns a LogoutRequest from the IdP for alice with the given SessionIndexes.
samlsp/middleware_soap_logout_test.go:111
↓ 9 callers
Function
soapLogoutResponse
soapLogoutResponse checks that w holds a LogoutResponse in a SOAP envelope, signed by the IdP, as sp reads it, and returns it.
identity_provider_logout_soap_request_test.go:75
↓ 9 callers
Function
spcovArtifactRequest
(artifact string)
sp_coverage_parse_test.go:331
↓ 9 callers
Function
spcovParse
(t *testing.T, s string)
sp_coverage_helpers_test.go:186
↓ 9 callers
Method
storeError
storeError answers a request whose Store operation failed with err: 404 Not Found if the item does not exist (ErrNotFound), otherwise 500 Internal Ser
samlidp/util.go:19
↓ 9 callers
Method
storedSessionParticipants
storedSessionParticipants returns the participants recorded for the session sessionID, in a stable order.
samlidp/logout_propagation.go:91
↓ 8 callers
Method
CreateSession
CreateSession is called when we have received a valid SAML assertion and should create a new session and modify the http response accordingly, e.g. by
samlsp/session.go:42
↓ 8 callers
Function
DefaultSessionCodec
DefaultSessionCodec returns the default SessionCodec for the provided options, a JWTSessionCodec configured to issue signed tokens.
samlsp/new.go:267
↓ 8 callers
Function
DefaultSessionProvider
DefaultSessionProvider returns the default SessionProvider for the provided options, a CookieSessionProvider configured to store sessions in a cookie.
samlsp/new.go:285
↓ 8 callers
Method
DeleteSession
DeleteSession is called to modify the response such that it removed the current session, e.g. by deleting a cookie.
samlsp/session.go:46
↓ 8 callers
Method
GetAttributes
()
samlsp/session.go:18
↓ 8 callers
Function
SessionFromContext
SessionFromContext returns the session associated with ctx, or nil if no session are associated
samlsp/session.go:77
↓ 8 callers
Function
covSessionCodec
(t *testing.T)
samlsp/session_coverage_test.go:19
↓ 8 callers
Function
decodeLogoutResponse
decodeLogoutResponse returns the LogoutResponse the IdP sent, without checking its signature.
identity_provider_logout_test.go:179
↓ 8 callers
Function
deflateAndEncode
deflateAndEncode serializes el, deflates it and base64 encodes the result, as the HTTP-Redirect binding requires.
redirect_binding.go:316
↓ 8 callers
Function
findChild
findChild finds the specified child element. Returns (nil, nil) of the element doesn't exist.
service_provider.go:3807
↓ 8 callers
Function
firstSet
(a, b string)
service_provider.go:3678
↓ 8 callers
Function
idpErrCheckSPRejects
idpErrCheckSPRejects checks that the SP parsing the form in body for requestIDs reports ErrBadStatus with topLevel.
idp_error_response_test.go:80
← previous
next →
101–200 of 2,436, ranked by callers