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
↓ 3 callers
Function
identifierEncrypter
identifierEncrypter returns the Encrypter for an EncryptedID: configured, if it is set, and otherwise RSA-OAEP-MGF1P (with a SHA-1 digest, which all i
encrypted_id.go:136
↓ 3 callers
Function
innerSigOtherSigner
A signature that is present must be valid even when an enclosing message is signed (saml-core §2.3.3, saml-profiles §4.1.4.3): a signed Response does
inner_signature_test.go:27
↓ 3 callers
Function
isRegistered
(test *ServerTest, entityID string)
samlidp/service_registration_test.go:40
↓ 3 callers
Function
isSimpleSignRequest
isSimpleSignRequest reports whether the posted form of req carries a SigAlg or Signature control, which marks it as an HTTP-POST-SimpleSign message (s
simplesign_binding.go:102
↓ 3 callers
Function
issueDeadline
issueDeadline is the last moment validateAssertion accepts assertion by its IssueInstant.
service_provider.go:2313
↓ 3 callers
Function
issueInstantDeadline
issueInstantDeadline is the last moment a message issued at issueInstant is accepted: MaxIssueDelay later. MaxIssueDelay already allows for some clock
service_provider.go:2320
↓ 3 callers
Function
jwtPayload
jwtPayload returns the claims of the JWT token, as JSON object keys.
samlsp/middleware_attribute_query_test.go:42
↓ 3 callers
Function
legacySessionParticipantsKey
legacySessionParticipantsKey is where participants were stored before each had its own key: one list per session. It is still read and deleted, so par
samlidp/logout_propagation.go:21
↓ 3 callers
Method
logoutResponse
(status string)
samlsp/middleware_logout_test.go:174
↓ 3 callers
Method
logoutStateSigner
logoutStateSigner returns the key the IdP signs with.
identity_provider_logout_propagation.go:795
↓ 3 callers
Method
lookupSession
lookupSession returns the unexpired session named by the session cookie in r, or nil if there is no such cookie, no such session or the session has ex
samlidp/session.go:185
↓ 3 callers
Method
makeLogoutRequest
makeLogoutRequest returns an unsigned LogoutRequest, whose NameID is encrypted if sp.EncryptLogoutNameID is set.
service_provider.go:2895
↓ 3 callers
Function
makeLogoutResponseWithStatus
makeLogoutResponseWithStatus returns the LogoutResponse to req after the logout was propagated: StatusSuccess, with the second-level status StatusPart
identity_provider_logout_propagation.go:591
↓ 3 callers
Function
multiKeyEncrypt
multiKeyEncrypt encrypts plaintext with AES-128-CBC under a fresh content key, inside an element named tag, and wraps that key with RSA-OAEP-MGF1P in
encrypted_key_recipients_test.go:40
↓ 3 callers
Function
nameidPolicy
(format, spNameQualifier string)
idp_nameid_test.go:29
↓ 3 callers
Function
newAQServer
(t *testing.T, e *spcovEnv)
service_provider_attribute_query_test.go:617
↓ 3 callers
Function
oaepDocument
oaepDocument builds an EncryptedData element whose AES-256-CBC key is wrapped with RSA-OAEP using the given options, the way another implementation wo
xmlenc/oaep_test.go:51
↓ 3 callers
Function
otherKey
otherKey returns a key that no test certificate trusts as the IDP's, and its certificate.
simplesign_binding_test.go:123
↓ 3 callers
Function
parseEl
(s string)
testdata/entra_id_gen/main.go:109
↓ 3 callers
Method
parseResponse
validateXMLResponse validates the SAML IDP response and returns the verified assertion. This function handles decrypting the message, verifying the d
service_provider.go:1644
↓ 3 callers
Method
partial
partial reports whether some participant of the logout was not logged out.
identity_provider_logout_propagation.go:279
↓ 3 callers
Function
plainHTTPServer
plainHTTPServer serves handler over plain http, and counts the requests it gets.
service_provider_soap_https_test.go:15
↓ 3 callers
Method
pushSessionExpiry
pushSessionExpiry adds entries to the heap and re-arms the timer if the earliest deadline changed.
samlidp/session_expiry.go:102
↓ 3 callers
Function
randomBytes
(n int)
samlidp/util.go:28
↓ 3 callers
Function
readLimited
readLimited reads r to the end, failing if it holds more than limit bytes.
soap.go:164
↓ 3 callers
Function
receivedChildren
receivedChildren returns the childNS/childTag children of read, and the children of received they correspond to, one for one. read is received itself,
service_provider.go:3786
↓ 3 callers
Function
redirectSign
(t *testing.T, key crypto.Signer, sigAlg, content string)
redirect_binding_test.go:58
↓ 3 callers
Method
reportBackChannelError
reportBackChannelError passes err to OnError, for logging, and discards what OnError writes: the request comes from the IDP, not a browser, and is ans
samlsp/middleware_soap_logout.go:59
↓ 3 callers
Function
reqSubjCheckSuccess
reqSubjCheckSuccess checks that the IdP answered with an assertion about alice@example.com that the SP accepts.
idp_request_subject_test.go:67
↓ 3 callers
Method
requests
requests returns the LogoutRequests the IdP received, after checking that each is signed by the SP.
samlsp/soap_start_logout_test.go:110
↓ 3 callers
Method
responseWriter
responseWriter returns idp.ResponseWriter, or DefaultResponseWriter if it is not set.
identity_provider.go:937
↓ 3 callers
Method
selectACSEndpoint
selectACSEndpoint sets SPSSODescriptor and ACSEndpoint to the first AssertionConsumerService endpoint in the service provider metadata for which match
identity_provider.go:1314
↓ 3 callers
Method
selectDefaultACSEndpoint
selectDefaultACSEndpoint selects the service provider's default AssertionConsumerService endpoint among those the IdP can send a Response to (see isSe
identity_provider.go:1301
↓ 3 callers
Function
selfSignedCert
(t *testing.T, key crypto.Signer)
crypto_signer_test.go:32
↓ 3 callers
Method
sendLoginForm
sendLoginForm produces a form which requests a username and password. If the form is shown during an SP-initiated flow, it directs the user back to th
samlidp/session.go:290
↓ 3 callers
Function
serveService
(t *testing.T, test *ServerTest, method, id string, body []byte)
samlidp/service_registration_test.go:32
↓ 3 callers
Method
sessionCookie
sessionCookie returns the session cookie with value and maxAge. The cookie is Secure when the IdP is served over https: when its configured URL (Opti
samlidp/logout.go:136
↓ 3 callers
Function
sessionDeleteAt
sessionDeleteAt returns when session is due to be deleted.
samlidp/session_expiry.go:60
↓ 3 callers
Function
sessionIndexRevocationKey
sessionIndexRevocationKey returns the revocation key of the sessions of the user whose NameID has the value nameID with the given SessionIndex.
samlsp/session_revocation.go:141
↓ 3 callers
Function
sessionKeyTestOptions
(t *testing.T, sessionKey crypto.Signer)
samlsp/session_key_test.go:19
↓ 3 callers
Method
sessionParticipantsOf
sessionParticipantsOf is sessionParticipants, and also reports whether exclude may be a participant of the sessions match selects: false only when the
identity_provider_logout_propagation.go:113
↓ 3 callers
Function
sessionParticipantsPrefix
sessionParticipantsPrefix is the prefix of the keys of the participants recorded for a session.
samlidp/logout_propagation.go:27
↓ 3 callers
Function
setWrongGlobalClock
setWrongGlobalClock points the deprecated package-level clocks at a time far from any Clock a test sets, to show that the Clock fields take precedence
samlsp/clock_test.go:20
↓ 3 callers
Function
sidBaseID
sidBaseID returns a standalone saml:BaseID element. BaseID is abstract: its content is defined by the xsi:type extension (saml-core §2.2.3).
subject_identifiers_test.go:18
↓ 3 callers
Function
sidEncrypt
sidEncrypt encrypts el to the certificate of e's SP (or to cert, if set) and wraps the xenc:EncryptedData in a new element named wrapper, such as saml
subject_identifiers_test.go:32
↓ 3 callers
Function
signDetached
signDetached signs content with signingContext and returns the base64 encoded signature, the value of the Signature parameter of the HTTP-Redirect and
redirect_binding.go:247
↓ 3 callers
Function
signMetadata
signMetadata returns ed as an XML element carrying an enveloped signature made with signingContext (saml-metadata-2.0-os §3). The signature reference
metadata.go:293
↓ 3 callers
Function
signSimpleSign
signSimpleSign signs message (the raw XML of a protocol message sent in messageParam) and relayState with signingContext for the HTTP-POST-SimpleSign
simplesign_binding.go:315
↓ 3 callers
Function
signWithMethod
signWithMethod returns el with an enveloped signature made by key with signatureMethod (which also sets the digest method), embedding cert.
sha1_policy_test.go:19
↓ 3 callers
Method
signedContent
signedContent returns the octet string m's signature covers.
simplesign_binding.go:94
↓ 3 callers
Function
signedRedirectBindingURL
signedRedirectBindingURL returns destination with the HTTP-Redirect binding parameters for encodedMessage appended. If signingContext is not nil, the
redirect_binding.go:377
↓ 3 callers
Function
signingCerts
signingCerts parses the certificates in keyDescriptors that may be used for signing, those whose "use" attribute is "signing" or missing. It returns n
service_provider.go:841
↓ 3 callers
Method
signingContext
signingContext returns a signing context for the IdP's key and certificate.
identity_provider.go:1933
↓ 3 callers
Method
simpleSignForm
simpleSignForm returns an auto-submitting HTML form that sends el to destination with the HTTP-POST-SimpleSign binding, in the messageParam (SAMLReque
simplesign_binding.go:343
↓ 3 callers
Function
simpleSignFormFields
simpleSignFormFields returns the values of the hidden fields of the form in body.
samlsp/simplesign_logout_test.go:72
↓ 3 callers
Function
simpleSignSignedContent
simpleSignSignedContent returns the octet string an HTTP-POST-SimpleSign signature covers (sstc-saml-binding-simplesign-cs-01 section 2.5). message is
simplesign_binding.go:79
↓ 3 callers
Function
skewedDeadline
skewedDeadline is a NotOnOrAfter time moved later by the allowed clock skew: the moment from which validateAssertion refuses it.
service_provider.go:2341
↓ 3 callers
Method
sloBinding
sloBinding returns the binding to send logout messages to the IDP with through the browser: LogoutBinding if it is set, is not the SOAP binding, and t
samlsp/middleware_logout.go:218
↓ 3 callers
Function
soapEnvelopeOf
soapEnvelopeOf returns el in a SOAP 1.1 envelope.
samlidp/logout_soap_test.go:113
↓ 3 callers
Function
soapHTTPClient
soapHTTPClient returns the HTTP client to send a SOAP message with: defaultSOAPHTTPClient when client is nil, and otherwise a copy of client whose red
soap.go:53
↓ 3 callers
Method
spForURL
spForURL returns the SP that serves u, or nil.
identity_provider_logout_propagation_test.go:140
↓ 3 callers
Function
spMetadataXML
spMetadataXML returns the metadata of a service provider with entity ID entityID.
samlidp/service_registration_test.go:18
↓ 3 callers
Function
spSendLogoutResponse
(t *testing.T, sp *ServiceProvider, resp *LogoutResponse, binding string)
identity_provider_logout_propagation_test.go:226
↓ 3 callers
Function
spcovInflate
(t *testing.T, buf []byte)
redirect_binding_test.go:493
↓ 3 callers
Function
specIDPTest
specIDPTest returns an IdentityProviderTest whose session provider always returns a session, restoring the globals NewIdentityProviderTest changes.
spec_bindings_test.go:74
↓ 3 callers
Function
specProtoSSORequest
specProtoSSORequest runs an SP-initiated AuthnRequest made by test.SP through the IdP's Validate, MakeAssertion and MakeResponse, for a session of ali
spec_core_protocols_test.go:26
↓ 3 callers
Function
specSigCheckProfile
specSigCheckProfile asserts that el carries exactly one enveloped ds:Signature as a direct child, laid out as saml-core-2.0-os §5.4 asks: a single Ref
spec_signature_encryption_test.go:173
↓ 3 callers
Function
statusError
statusError returns nil for a Success status, and otherwise an error that wraps an ErrBadStatus holding the top-level status code.
service_provider_attribute_query.go:400
↓ 3 callers
Function
testMetadataSigner
(t *testing.T)
samlsp/verify_metadata_signature_test.go:51
↓ 3 callers
Function
trimXMLWhitespace
trimXMLWhitespace removes leading and trailing XML whitespace (space, tab, CR and LF) from s. Attributes of type xs:anyURI have whiteSpace="collapse"
metadata.go:585
↓ 3 callers
Function
unmarshalEtreeHack
unmarshalEtreeHack parses `el` and sets values in the structure `v`. This is a hack -- it first serializes the element, then uses xml.Unmarshal.
identity_provider.go:1862
↓ 3 callers
Method
validateAttributeQueryAssertion
validateAttributeQueryAssertion checks assertion, apart from its signature, as an answer to query. Unlike validateAssertion, it does not require a bea
service_provider_attribute_query.go:505
↓ 3 callers
Method
validateAuthnContextClassRef
validateAuthnContextClassRef checks, if ValidateAuthnContextClassRef is set, that one of the assertion's AuthnStatements has an AuthnContextClassRef t
service_provider.go:2248
↓ 3 callers
Method
validateRequestID
(response Response, possibleRequestIDs []string)
service_provider.go:1820
↓ 3 callers
Function
verifierFor
verifierFor returns a ServiceProvider that trusts sp's certificate as the IDP signing certificate, to check what sp sends.
redirect_binding_test.go:417
↓ 3 callers
Method
verifyRedirectBindingSignature
verifyRedirectBindingSignature checks the query string signature of an HTTP-Redirect binding message against the IDP's signing certificates.
redirect_binding.go:178
↓ 3 callers
Function
verifySignedBySP
(t *testing.T, e *spcovEnv, el *etree.Element)
service_provider_soap_logout_test.go:117
↓ 3 callers
Method
verifySimpleSignSignature
verifySimpleSignSignature checks the HTTP-POST-SimpleSign signature of the authentication request against the signing certificates in the service prov
simplesign_idp.go:22
↓ 3 callers
Function
writeText
writeText writes a formatted line of the response. An error writing to the client cannot be reported back to it, so it is deliberately ignored.
example/service.go:179
↓ 2 callers
Function
CreateLink
CreateLink handles requests to create links. The target is the form value "t", for example: curl -d t=https://example.com/ ...
example/service.go:89
↓ 2 callers
Function
DefaultOnError
DefaultOnError is the default ErrorFunction implementation. It prints a message via the standard log package and returns a simple text "Forbidden" mes
samlsp/error.go:19
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form, in exclusive canonical form. It panics if the assertion cannot be canonicalized
schema.go:1181
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:1286
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:1708
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:1788
↓ 2 callers
Method
Encode
Encode returns a serialized version of the Session. The provided session must be a JWTSessionClaims, otherwise this function will panic.
samlsp/session_jwt.go:159
↓ 2 callers
Method
Error
()
service_provider.go:1295
↓ 2 callers
Function
FetchMetadataByEntityID
FetchMetadataByEntityID fetches metadata from metadataURL and returns the entity whose entityID is entityID. Use it to select an IDP from aggregate me
samlsp/fetch_metadata.go:276
↓ 2 callers
Function
FetchSignedMetadata
FetchSignedMetadata fetches metadata from metadataURL and parses it with ParseSignedMetadata: its root element must carry a valid signature made with
samlsp/fetch_metadata.go:287
↓ 2 callers
Method
Get
Get returns the assertion attribute whose Name or FriendlyName matches name, or nil if no matching attribute is found. FriendlyName "MUST NOT be used
service_provider.go:1254
↓ 2 callers
Method
GetAttributeServiceLocation
GetAttributeServiceLocation returns the URL of the IdP's AttributeService endpoint with the given binding, from the AttributeAuthorityDescriptors of t
service_provider_attribute_query.go:53
↓ 2 callers
Method
InitializeHTTP
InitializeHTTP sets up the HTTP handler for the server. (This function is called automatically for you by New, but you may need to call it yourself if
samlidp/samlidp.go:220
↓ 2 callers
Method
List
List returns all the keys that start with `prefix`. The prefix is stripped from each returned value. So if keys are ["aa", "ab", "cd"] then List("a")
samlidp/memory_store.go:55
↓ 2 callers
Function
ListLinks
ListLinks returns a list of the current user's links
example/service.go:133
↓ 2 callers
Method
MakeSimpleSignLogoutRequest
MakeSimpleSignLogoutRequest creates a SAML LogoutRequest for the IDP's HTTP-POST-SimpleSign single logout endpoint. It returns an auto-submitting HTML
simplesign_binding.go:419
↓ 2 callers
Method
MakeSimpleSignLogoutResponseWithStatus
MakeSimpleSignLogoutResponseWithStatus is like MakeSimpleSignLogoutResponse, but the response carries status instead of Success (see MakeLogoutRespons
simplesign_binding.go:457
↓ 2 callers
Method
Metadata
Metadata returns the metadata structure for this identity provider.
identity_provider.go:529
↓ 2 callers
Function
OAEP_SHA384
OAEP_SHA384 returns a version of RSA that implements RSA in OAEP mode (XML Encryption 1.1). By default the block cipher used is AES-256 CBC and the di
xmlenc/pubkey.go:219
↓ 2 callers
Method
Put
(key string, value interface{})
samlidp/samlidp_coverage_test.go:43
↓ 2 callers
Function
RegisterDigestMethod
RegisterDigestMethod registers the specified digest method so that it can be used with Decrypt(). It is safe to call concurrently with Decrypt.
xmlenc/xmlenc.go:84
← previous
next →
501–600 of 2,436, ranked by callers