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
checkRevoked
checkRevoked returns an error if session is revoked in Revocations, or if that cannot be checked. Sessions that do not implement RevocableSession cann
samlsp/session_revocation.go:212
↓ 1 callers
Function
checkSOAPFault
checkSOAPFault checks that w is a SOAP Client fault, with no LogoutResponse.
identity_provider_logout_soap_request_test.go:105
↓ 1 callers
Function
checkSigningKey
checkSigningKey returns an error if opts asks for signed requests or logout messages but opts.Key cannot make XML signatures.
samlsp/new.go:482
↓ 1 callers
Method
clearLogoutStateCookie
(w http.ResponseWriter, r *http.Request)
identity_provider_logout_propagation.go:956
↓ 1 callers
Method
consume
consume records the ID of the validated request in the IdP's ReplayCache, if it is set and the request is signed, and returns an error if it was alrea
identity_provider.go:1037
↓ 1 callers
Method
consumeArtifact
consumeArtifact records the artifact in the ReplayCache, if one is set, refusing it if it was recorded before. A type 0x0004 artifact is recorded by i
artifact.go:141
↓ 1 callers
Function
containsString
containsString reports whether values contains value.
identity_provider_authn_context.go:156
↓ 1 callers
Method
cookieFrom
(t *testing.T, w *httptest.ResponseRecorder)
identity_provider_logout_propagation_test.go:308
↓ 1 callers
Function
countIDPEntities
countIDPEntities returns the number of entities with an IDPSSODescriptor in entities and in any EntitiesDescriptor nested in it.
samlsp/fetch_metadata.go:128
↓ 1 callers
Function
covACSRequest
(test *MiddlewareTest, trackedRequestID string)
samlsp/middleware_coverage_test.go:74
↓ 1 callers
Function
covCBCData
covCBCData returns an EncryptedData element holding a random IV followed by the CBC encryption of plaintext (which must be whole blocks and is not pad
xmlenc/cbc_coverage_test.go:63
↓ 1 callers
Function
covDeflate
(t *testing.T, data string)
testsaml/parse_test.go:16
↓ 1 callers
Function
covEncryptedKeyWithCert
covEncryptedKeyWithCert returns an EncryptedKey element whose KeyInfo holds certText as its X509Certificate.
xmlenc/decrypt_coverage_test.go:47
↓ 1 callers
Function
covFormRequest
(form url.Values, cookies ...*http.Cookie)
samlsp/middleware_coverage_test.go:191
↓ 1 callers
Function
covKeyTransportRoundTrip
covKeyTransportRoundTrip encrypts plaintext with e, unwraps the session key with e directly (so it works for key transports that are not registered as
xmlenc/pubkey_coverage_test.go:21
↓ 1 callers
Function
covURL
(param, value string)
testsaml/parse_test.go:27
↓ 1 callers
Function
decodeArtifact
decodeArtifact decodes the base64 SAMLart value s as a type 0x0004 artifact. The error matches ErrMalformedMessage when s is not base64 of 44 bytes, a
artifact.go:45
↓ 1 callers
Method
decryptEncryptedAttribute
decryptEncryptedAttribute returns the saml:Attribute held by encryptedEl, a saml:EncryptedAttribute, decrypted with the SP's decryption keys.
service_provider.go:2131
↓ 1 callers
Method
decryptEncryptedID
decryptEncryptedID returns the NameID held by encryptedID, or nameID if encryptedID is nil. The two are alternatives, so an element with both is rejec
service_provider.go:2037
↓ 1 callers
Function
decryptWithKey
decryptWithKey decrypts encryptedDataEl, the EncryptedData child of encryptedEl, with decryptionKey. If encryptedKeyEl is not nil, it is an EncryptedK
service_provider.go:1933
↓ 1 callers
Function
defaultAttributeConsumingService
defaultAttributeConsumingService returns the SP's AttributeConsumingService marked isDefault, else its first one, else an empty one.
identity_provider.go:1994
↓ 1 callers
Function
defaultNameIDFormats
defaultNameIDFormats returns the NameID formats samlidp advertises in its metadata: the ones it issues (see nameIDFormatForEmail), emailAddress for us
samlidp/samlidp.go:210
↓ 1 callers
Method
deleteSessionsMatching
deleteSessionsMatching deletes every stored session that req matches.
samlidp/logout.go:88
↓ 1 callers
Function
deleteSignatures
deleteSignatures removes, from v and everything in it, the "Signature" members whose value is an object. It reports whether it removed any.
samlidp/service.go:99
↓ 1 callers
Method
dropExpired
dropExpired removes the IDs whose expiry is not after now. It does nothing before nextExpiry, so a cache full of unexpired IDs is not scanned on every
samlsp/replay_cache.go:94
↓ 1 callers
Method
dropExpired
dropExpired removes the records whose expiry is before now. It does nothing before nextExpiry, so a store full of unexpired records is not scanned on
samlsp/session_revocation.go:357
↓ 1 callers
Function
elementString
(t *testing.T, el *etree.Element)
audience_restriction_test.go:125
↓ 1 callers
Method
encryptLogoutNameID
encryptLogoutNameID replaces the NameID of logoutRequest with a saml:EncryptedID holding it, encrypted to the encryption certificate in metadata, the
identity_provider_logout_propagation.go:408
↓ 1 callers
Function
entraAssertion
(idpInitiated bool)
testdata/entra_id_gen/main.go:76
↓ 1 callers
Function
entraEncrypt
entraEncrypt mimics the WIF-style EncryptedAssertion Entra ID produces when token encryption is enabled: AES-256-CBC content, RSA-OAEP key transport,
testdata/entra_id_gen/main.go:150
↓ 1 callers
Function
entraMetadata
(kp tls.Certificate)
testdata/entra_id_gen/main.go:186
↓ 1 callers
Function
entraResponse
(kp tls.Certificate, signResponse, signAssertion, encrypt, idpInitiated bool)
testdata/entra_id_gen/main.go:117
↓ 1 callers
Method
fail
(err error)
identity_provider_logout_soap_test.go:84
↓ 1 callers
Function
fill20
(b byte)
artifact_decoding_test.go:252
↓ 1 callers
Function
findEntityByID
findEntityByID returns the first EntityDescriptor in entities, or in any EntitiesDescriptor nested in it, whose entityID is entityID, with the validit
samlsp/fetch_metadata.go:182
↓ 1 callers
Function
findIDPEntity
findIDPEntity returns an EntityDescriptor with an IDPSSODescriptor in entities, or in any EntitiesDescriptor nested in it, with the validity of entiti
samlsp/fetch_metadata.go:205
↓ 1 callers
Method
finishLogout
finishLogout ends a single logout once every participant has been contacted: it answers the service provider that started it, with PartialLogout if so
identity_provider_logout_propagation.go:541
↓ 1 callers
Function
getVerifiedSPMetadata
getVerifiedSPMetadata is getSPMetadata, except that when certs is not empty the root element of the metadata must carry a valid enveloped XML signatur
samlidp/util.go:53
↓ 1 callers
Function
hasSAMLRequest
(r *http.Request)
identity_provider_logout_propagation_test.go:261
↓ 1 callers
Function
hasSessionIndex
hasSessionIndex reports whether req carries a non-empty SessionIndex.
samlidp/logout.go:78
↓ 1 callers
Function
hostFromRemoteAddr
hostFromRemoteAddr returns the host part of an http.Request RemoteAddr, which is normally "IP:port". SubjectConfirmationData/@Address and SubjectLocal
identity_provider.go:1362
↓ 1 callers
Method
httpClient
httpClient returns the client the IdP sends SOAP messages with.
identity_provider_logout_soap.go:21
↓ 1 callers
Function
idpErrLater
idpErrLater moves TimeNow past MaxIssueDelay, so that requests made before it are expired.
idp_error_response_test.go:264
↓ 1 callers
Function
idpcovECDSACert
(t *testing.T)
idp_coverage_test.go:119
↓ 1 callers
Method
innerSigAddSignedUsingParentXS
innerSigAddSignedUsingParentXS adds el to parent, signed by the IdP with an exc-c14n Reference transform whose InclusiveNamespaces PrefixList is "xs",
inner_signature_test.go:160
↓ 1 callers
Function
innerSigNilError
innerSigNilError is assert.NilError, reporting an InvalidResponseError's PrivateErr.
inner_signature_test.go:229
↓ 1 callers
Method
innerSigOuterSign
innerSigOuterSign signs el with the IdP key and an empty PrefixList, as e.idpSign does, keeping el's xmlns:xs declaration. goxmldsig returns the signe
inner_signature_test.go:218
↓ 1 callers
Method
innerSigResponse
innerSigResponse returns a Response signed by the IdP whose assertion is prepared by signAssertion.
inner_signature_test.go:36
↓ 1 callers
Function
innerSigWithoutOwnXS
innerSigWithoutOwnXS removes the xmlns:xs declarations of el's AttributeValues, leaving their xsi:type="xs:..." to an ancestor's.
inner_signature_test.go:206
↓ 1 callers
Function
isBcryptHash
isBcryptHash reports whether hash is a well-formed bcrypt hash that bcrypt.CompareHashAndPassword will actually do the hashing work for.
samlidp/session.go:41
↓ 1 callers
Function
isCookieNameToken
isCookieNameToken reports whether s is non-empty and made only of the characters RFC 6265 allows in a cookie name (an RFC 2616 token).
samlsp/request_tracker_cookie.go:65
↓ 1 callers
Function
isLogoutResponseMessage
isLogoutResponseMessage reports whether r carries a SAMLResponse, rather than a SAMLRequest, to the single logout service.
identity_provider_logout_propagation.go:601
↓ 1 callers
Function
isSameOriginRequest
isSameOriginRequest reports whether the browser says that r comes from a page on the same origin. Forms posted from another site are never replayed: t
samlsp/form_replay.go:209
↓ 1 callers
Function
isSentinel
(tok, want xml.Token)
internal/xmlroundtrip/validate.go:222
↓ 1 callers
Function
issueCert
issueCert creates a certificate for key, signed by parentKey as parent, or self-signed when parent is nil.
sp_signed_metadata_test.go:118
↓ 1 callers
Function
largeAssertion
largeAssertion builds an assertion with more child elements than goxmldsig's default traversal budget of 1000, as an IdP sending a user's many group m
signature_size_test.go:53
↓ 1 callers
Function
legacySessionCookieDomain
legacySessionCookieDomain returns the Domain attribute that earlier versions of DefaultSessionProvider used for the session cookie (the host of opts.U
samlsp/new.go:313
↓ 1 callers
Method
logoutParticipant
logoutParticipant logs participant out. If its metadata lists a SOAP SingleLogoutService, it is sent a LogoutRequest over the SOAP binding first (see
identity_provider_logout_propagation.go:306
↓ 1 callers
Method
logoutParticipantSOAP
logoutParticipantSOAP logs participant out server to server: it sends a signed LogoutRequest to the SOAP SingleLogoutService that metadata, the metada
identity_provider_logout_soap.go:58
↓ 1 callers
Method
logoutParticipantsSOAP
logoutParticipantsSOAP logs each of participants out over the SOAP binding (see logoutParticipantSOAP), several at a time and within BackChannelLogout
identity_provider_logout_soap_request.go:136
↓ 1 callers
Function
logoutRequestAcceptableUntil
logoutRequestAcceptableUntil returns the moment after which a LogoutRequest is refused: IssueInstant plus MaxIssueDelay or, if it is earlier, the NotO
service_provider.go:2414
↓ 1 callers
Method
logoutRequestBytes
(t *testing.T, nameID, sessionIndex string)
samlidp/logout_test.go:184
↓ 1 callers
Function
logoutRequestEndpoint
logoutRequestEndpoint returns the SingleLogoutService of a service provider to send a LogoutRequest to: the first HTTP-Redirect one, or else the first
identity_provider_logout_propagation.go:432
↓ 1 callers
Method
logoutRequestWriter
logoutRequestWriter signs logoutRequest for binding and returns a function that sends it to the browser, which cannot fail.
identity_provider_logout_propagation.go:479
↓ 1 callers
Function
lookupDecrypter
lookupDecrypter returns the decrypter registered for algorithm.
xmlenc/xmlenc.go:91
↓ 1 callers
Function
lookupDigestMethod
lookupDigestMethod returns the digest method registered for algorithm.
xmlenc/xmlenc.go:99
↓ 1 callers
Method
makeAssertionNameID
makeAssertionNameID returns the NameID that DefaultAssertionMaker puts in the Subject of the assertion it makes for session. The format is session.Na
identity_provider_nameid.go:23
↓ 1 callers
Method
maxAge
()
samlsp/form_replay.go:122
↓ 1 callers
Method
maxEntries
()
samlsp/form_replay.go:115
↓ 1 callers
Method
maxFormSize
()
samlsp/form_replay.go:108
↓ 1 callers
Function
metadataChildTags
metadataChildTags returns the local names of the child elements of the element at path in the XML document buf.
metadata_roundtrip_test.go:14
↓ 1 callers
Method
metadataNameIDFormat
metadataNameIDFormat returns the NameIDFormat advertised in the SP metadata. Unlike the NameIDPolicy in an AuthnRequest, where an omitted Format means
service_provider.go:3291
↓ 1 callers
Function
mgf1XOR
mgf1XOR XORs out with MGF1(seed) using hash h, as RFC 8017 appendix B.2.1 describes.
xmlenc/oaep_mgf.go:60
↓ 1 callers
Function
mgfURIFor
mgfURIFor returns the MGF URI for MGF1 using the same hash as dm.
xmlenc/oaep.go:48
↓ 1 callers
Function
mustBase64Decode
(t *testing.T, s string)
identity_provider_logout_propagation_test.go:648
↓ 1 callers
Function
mustParseCertificate
(pemStr []byte)
identity_provider_test.go:67
↓ 1 callers
Function
mustParseURL
(s string)
identity_provider_test.go:47
↓ 1 callers
Function
nameIDFormatDefinesQualifiers
nameIDFormatDefinesQualifiers reports whether format defines the use of the NameQualifier and SPNameQualifier attributes. saml-core §2.2.2 says they S
identity_provider_nameid.go:60
↓ 1 callers
Function
nameIDFormatForEmail
nameIDFormatForEmail returns the format of a NameID whose value is the user's email address: emailAddress, rather than the transient format saml.Defau
samlidp/session.go:391
↓ 1 callers
Function
nameIDMatchesRequest
nameIDMatchesRequest reports whether the asserted NameID identifies the principal the requested one does: the values are equal, and so is each attribu
identity_provider_request_subject.go:107
↓ 1 callers
Method
nameIDsIdentical
nameIDsIdentical reports whether got is identical to want, as saml-core §3.3.4 requires of the subject of an assertion answering a query. An omitted F
service_provider_attribute_query.go:569
↓ 1 callers
Function
namespaceDeclPrefix
namespaceDeclPrefix reports whether attr is a namespace declaration and, if so, the prefix it declares ("" for the default namespace).
service_provider.go:3864
↓ 1 callers
Function
nestedAggregate
nestedAggregate wraps children in an <EntitiesDescriptor>.
samlsp/fetch_metadata_test.go:148
↓ 1 callers
Function
newChecker
()
internal/xmlroundtrip/validate.go:153
↓ 1 callers
Function
newKeyPair
newKeyPair returns a freshly generated RSA key and a matching self-signed certificate. The example uses a throwaway key so that it never ships a priva
example/service.go:199
↓ 1 callers
Function
newKeyPair
newKeyPair returns a freshly generated RSA key and a matching self-signed certificate. The example uses a throwaway key so that it never ships a priva
example/idp/idp.go:33
↓ 1 callers
Function
newMockRSASigner
(t *testing.T)
samlsp/middleware_test.go:668
↓ 1 callers
Function
newMultiCertTestKey
(t *testing.T, name string)
service_provider_multicert_test.go:24
↓ 1 callers
Function
newShortLink
newShortLink returns a random, URL-safe short link name.
example/service.go:77
↓ 1 callers
Function
otherMetadataSigner
(t *testing.T)
samlsp/verify_metadata_signature_test.go:58
↓ 1 callers
Function
overrideDestinationFromDocument
(doc *etree.Document, newDestination string)
service_provider_test.go:1124
↓ 1 callers
Method
parseArtifactResponse
(artifactResponseEl *etree.Element, possibleRequestIDs []string, artifactRequestID string, now time.Time, curr
service_provider.go:1487
↓ 1 callers
Method
parseAttributeQueryResponse
(soapResponseXML []byte, query *AttributeQuery, now time.Time)
service_provider_attribute_query.go:273
↓ 1 callers
Method
parseEncryptedAssertion
(encryptedAssertionEl *etree.Element, possibleRequestIDs []string, now time.Time, signatureRequirement signatu
service_provider.go:1884
↓ 1 callers
Method
parseLogoutResponseSimpleSign
parseLogoutResponseSimpleSign validates a LogoutResponse received via the HTTP-POST-SimpleSign binding. Its SimpleSign signature must be valid.
service_provider.go:3363
↓ 1 callers
Function
parsePlaintext
parsePlaintext parses the plaintext of a decrypted element and returns its root element.
service_provider.go:1910
↓ 1 callers
Method
parseRequest
parseRequest parses RequestBuffer into Request and returns the root element of the request.
identity_provider_logout.go:243
↓ 1 callers
Method
parseResponseHTTP
(req *http.Request, possibleRequestIDs []string)
service_provider.go:1407
↓ 1 callers
Method
parseSOAPLogoutRequest
(soapRequestXML []byte)
service_provider_soap_logout.go:98
↓ 1 callers
Method
parseSOAPLogoutResponse
parseSOAPLogoutResponse reads the LogoutResponse in body, the SOAP envelope that the service provider serviceProviderID, whose metadata is metadata, r
identity_provider_logout_soap.go:139
← previous
next →
901–1,000 of 2,436, ranked by callers