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
↓ 5 callers
Method
AddSessionParticipant
AddSessionParticipant records that an assertion for session was issued to participant. Recording the same participant twice should not make it appear
identity_provider_logout_propagation.go:66
↓ 5 callers
Function
DefaultTrackedRequestCodec
DefaultTrackedRequestCodec returns a new TrackedRequestCodec for the provided options, a JWTTrackedRequestCodec that uses a JWT to encode TrackedReque
samlsp/new.go:340
↓ 5 callers
Method
Delete
Delete removes `key`
samlidp/store.go:17
↓ 5 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:1945
↓ 5 callers
Function
IsSOAPRequest
IsSOAPRequest reports whether r is a message sent with the SAML SOAP binding: a POST whose Content-Type is text/xml (SOAP 1.1 over HTTP, saml-bindings
service_provider_soap_logout.go:29
↓ 5 callers
Method
MakeAttributeQuery
MakeAttributeQuery returns an AttributeQuery for the attributes of the subject identified by nameID, addressed to the IdP's SOAP AttributeService (see
service_provider_attribute_query.go:90
↓ 5 callers
Method
MakeLogoutResponse
MakeLogoutResponse returns an unsigned LogoutResponse to the request with the given top-level status code (for example StatusSuccess or StatusResponde
identity_provider_logout.go:428
↓ 5 callers
Method
MakePostAuthenticationRequest
MakePostAuthenticationRequest creates a SAML authentication request using the HTTP-POST binding. It returns HTML text representing an HTML form that c
service_provider.go:1185
↓ 5 callers
Function
ParseMetadataByEntityID
ParseMetadataByEntityID parses SAML metadata and returns the EntityDescriptor whose entityID is entityID. The metadata may be a single <EntityDescrip
samlsp/fetch_metadata.go:96
↓ 5 callers
Method
Println
Println prints new line.
logger/logger.go:16
↓ 5 callers
Method
Sign
(r io.Reader, digest []byte, opts crypto.SignerOpts)
crypto_signer_test.go:28
↓ 5 callers
Method
SimpleSignWithNonce
SimpleSignWithNonce is like SimpleSign, but if nonce is not empty it is set as the nonce attribute of the form's auto-submit <script> element, as Post
simplesign_binding.go:407
↓ 5 callers
Function
acceptableUntil
acceptableUntil returns the moment after which validateAssertion refuses assertion: the earliest of the deadlines its expiry checks apply. A NotOnOrAf
service_provider.go:2358
↓ 5 callers
Method
acsRequest
acsRequest returns the POST of the test SAML response to the ACS URL, with a tracked request cookie for uri.
samlsp/form_replay_test.go:25
↓ 5 callers
Function
assertIsSigFixture
assertIsSigFixture checks that el is sigFixture, prefixes included.
metadata_signature_test.go:22
↓ 5 callers
Function
assertNoPassive
assertNoPassive checks that body posts an error Response to request with the status Responder and NoPassive, and shows no login form.
samlidp/force_authn_passive_test.go:128
↓ 5 callers
Function
assertStandalone
The serialized element must be well-formed XML on its own: every prefix it uses has to be declared, and the default namespace must be written as xmlns
element_to_bytes_test.go:24
↓ 5 callers
Function
checkOnlyKind
(t *testing.T, err error, want error)
errors_test.go:94
↓ 5 callers
Function
checkSigRefProfile
checkSigRefProfile asserts that err accepts or rejects c as the profile requires. privateErr returns the error carrying the message.
signature_reference_profile_test.go:57
↓ 5 callers
Method
cookieName
cookieName returns the name of the cookie that tracks the request with the given index. An index is the RelayState sent to the IdP; the default one is
samlsp/request_tracker_cookie.go:56
↓ 5 callers
Function
covECDSAKey
(t *testing.T, curve elliptic.Curve)
samlsp/samlsp_coverage_test.go:50
↓ 5 callers
Function
decodeDetachedSignature
decodeDetachedSignature maps the SigAlg value of a binding that carries a detached signature (HTTP-Redirect or HTTP-POST-SimpleSign) to an x509 signat
redirect_binding.go:206
↓ 5 callers
Method
decodeLogoutState
decodeLogoutState checks the signature of value, made by encodeLogoutState, and returns the state it holds if it has not expired.
identity_provider_logout_propagation.go:839
↓ 5 callers
Method
dsigClock
dsigClock returns the clock to use for signature validation. It may be nil, in which case dsig uses the real clock.
service_provider.go:535
↓ 5 callers
Function
encryptionKey
encryptionKey returns the certificate to encrypt to from the KeyDescriptors of an entity's metadata, and the EncryptionMethods listed with it: the fir
encrypted_id.go:161
↓ 5 callers
Method
entityID
entityID returns the IdP's entity ID, the EntityID of its metadata, without building the whole metadata (which encodes every certificate).
identity_provider.go:660
↓ 5 callers
Method
entityID
entityID is the entity ID of this service provider.
service_provider_attribute_query.go:581
↓ 5 callers
Method
getIDPSigningCerts
getIDPSigningCerts returns the certificates which we can use to verify things signed by the IDP in PEM format, or nil if no such certificate is found.
service_provider.go:790
↓ 5 callers
Function
getSPMetadata
getSPMetadata reads service provider metadata from r: an EntityDescriptor, or an EntitiesDescriptor holding exactly one entity with an SPSSODescriptor
samlidp/util.go:44
↓ 5 callers
Method
idpSOAPLogoutResponse
idpSOAPLogoutResponse returns a SOAP envelope with a LogoutResponse to req from the IdP, signed by it if sign is set, after mutate.
service_provider_soap_logout_test.go:355
↓ 5 callers
Method
idpSignedSOAPLogoutRequest
idpSignedSOAPLogoutRequest returns req signed by the IdentityProvider and wrapped in a SOAP envelope, as a spec-conformant IdP sends it with the SOAP
service_provider_soap_logout_test.go:36
↓ 5 callers
Function
idpcovMadeAssertion
(t *testing.T, test *IdentityProviderTest)
idp_coverage_test.go:349
↓ 5 callers
Method
keepCookies
keepCookies stores the IdP cookies that w sets.
identity_provider_logout_propagation_test.go:160
↓ 5 callers
Method
login
login logs alice in with POST /login and returns the session cookie.
samlidp/force_authn_passive_test.go:48
↓ 5 callers
Method
logoutRequest
(t *testing.T, nameID, sessionIndex string)
samlidp/logout_test.go:87
↓ 5 callers
Function
mustFindElement
(t *testing.T, xmlStr, path string)
element_to_bytes_test.go:12
↓ 5 callers
Function
mustParseURL
(s string)
samlidp/samlidp_test.go:35
↓ 5 callers
Function
newExpiryServer
newExpiryServer returns a server whose timers are faked and whose clock is *clock.
samlidp/session_expiry_test.go:74
↓ 5 callers
Function
newSOAPLogoutIDPServer
(t *testing.T, e *spcovEnv)
service_provider_soap_logout_test.go:329
↓ 5 callers
Function
newSOAPStartLogoutTest
newSOAPStartLogoutTest returns a logoutTest whose IdP supports single logout with the given front-channel bindings and with the SOAP binding at a fake
samlsp/soap_start_logout_test.go:41
↓ 5 callers
Function
newTestECDSAKeyAndCert
(t *testing.T)
service_provider_encryption_key_test.go:21
↓ 5 callers
Function
putSessionExpiringAt
(t *testing.T, s *Server, id string, expire time.Time)
samlidp/session_expiry_test.go:16
↓ 5 callers
Function
racAssertedClass
racAssertedClass returns the top-level status code of the Response posted in w and, for a Success, the AuthnContextClassRef of the assertion as test.S
idp_requested_authn_context_test.go:43
↓ 5 callers
Function
racServeSSO
racServeSSO sends an AuthnRequest from test.SP carrying requested to ServeSSO, with a session authenticated with achieved, and returns the recorded HT
idp_requested_authn_context_test.go:24
↓ 5 callers
Function
reqSubjNameID
(value string)
idp_request_subject_test.go:85
↓ 5 callers
Method
run
run follows the logout from the IdP's response w through every SP until the browser leaves the SPs' SingleLogoutServices, and returns the last respons
identity_provider_logout_propagation_test.go:243
↓ 5 callers
Method
serve
(r *http.Request)
samlidp/logout_propagation_test.go:39
↓ 5 callers
Function
setReplayCacheTestNow
setReplayCacheTestNow makes saml.TimeNow return *now for the rest of the test.
samlsp/replay_cache_test.go:26
↓ 5 callers
Function
sidParse
sidParse parses a Response signed by e's IdP whose assertion is a, after mutate edits the Assertion element.
subject_identifiers_test.go:55
↓ 5 callers
Function
sigRefProfileCases
()
signature_reference_profile_test.go:31
↓ 5 callers
Function
signToken
signToken signs token with signer. Concrete in-memory keys (*rsa.PrivateKey, *ecdsa.PrivateKey and ed25519.PrivateKey) are handed to the jwt library
samlsp/jwt_signer.go:26
↓ 5 callers
Method
signingContext
signingContext will create a signing context for the request.
identity_provider.go:1928
↓ 5 callers
Function
soapPost
(target string, body []byte)
service_provider_soap_logout_test.go:45
↓ 5 callers
Function
specMetadataSP
Tests in this file pin behavior required by the OASIS SAML V2.0 Metadata specification (saml-metadata-2.0-os) and the "Use of Metadata" sections of th
spec_metadata_test.go:24
↓ 5 callers
Function
specMiddlewareTest
specMiddlewareTest is NewMiddlewareTest, restoring the package globals it changes when the test ends.
samlsp/spec_bindings_test.go:26
↓ 5 callers
Function
specProfServeSPMetadata
specProfServeSPMetadata makes the IdP of test see md as the metadata of test.SP.
spec_profiles_test.go:84
↓ 5 callers
Function
startAuthFlow
(test *MiddlewareTest, req *http.Request)
samlsp/form_replay_test.go:52
↓ 5 callers
Function
successStatus
successStatus returns the Status of a request that succeeded.
service_provider.go:3123
↓ 5 callers
Method
values
(t *testing.T)
simplesign_binding_test.go:41
↓ 5 callers
Function
verifiedEnvelopedElement
verifiedEnvelopedElement checks the enveloped XML signature of el, which must be a direct child of el and reference it as saml-core-2.0-os §5.4.2 asks
identity_provider_logout.go:682
↓ 5 callers
Method
writePostForm
writePostForm writes an HTML page holding form, the auto-submitting form of the HTTP-POST binding whose script has the hash scriptHash.
samlsp/middleware.go:334
↓ 4 callers
Method
AllAudiences
AllAudiences returns every audience in the restriction: Audience followed by AdditionalAudiences.
schema.go:1612
↓ 4 callers
Method
Consume
Consume atomically records assertionID as used until expiresAt, after which the ServiceProvider no longer accepts the assertion; then the record may b
service_provider.go:521
↓ 4 callers
Function
ContextWithSession
ContextWithSession returns a new context with session associated
samlsp/session.go:86
↓ 4 callers
Method
DefaultOnError
DefaultOnError is how ServeSSO, ServeIDPInitiated and ServeMetadata report an error when OnError is nil: it logs err to Logger and responds with statu
identity_provider.go:727
↓ 4 callers
Function
DefaultRequestTracker
DefaultRequestTracker returns a new RequestTracker for the provided options, a CookieRequestTracker which uses cookies to track pending requests.
samlsp/new.go:354
↓ 4 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:332
↓ 4 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:852
↓ 4 callers
Method
EncryptLogoutRequestNameID
EncryptLogoutRequestNameID replaces the NameID of req with a saml:EncryptedID holding it (saml-core-2.0-os §2.2.4), encrypted to the IDP's encryption
service_provider.go:2912
↓ 4 callers
Method
GetArtifactBindingLocation
GetArtifactBindingLocation returns URL for the IDP's Artifact binding of the specified type, or "" if there is none or IDPMetadata is nil.
service_provider.go:744
↓ 4 callers
Method
GetTrackedRequest
GetTrackedRequest returns a pending tracked request.
samlsp/request_tracker.go:29
↓ 4 callers
Method
HandleStartAuthFlow
HandleStartAuthFlow is called to start the SAML authentication process.
samlsp/middleware.go:229
↓ 4 callers
Method
Handler
Handler returns an http.Handler that serves the metadata and SSO URLs, and the single logout URL (see ServeSLO) if LogoutURL is set and its path diffe
identity_provider.go:667
↓ 4 callers
Method
MakeLogoutResponseWithStatus
MakeLogoutResponseWithStatus is like MakeLogoutResponse, but the response carries status instead of Success. For example, a service provider that ende
service_provider.go:3096
↓ 4 callers
Method
MakePostLogoutRequest
MakePostLogoutRequest creates a SAML authentication request using the HTTP-POST binding. It returns HTML text representing an HTML form that can be se
service_provider.go:3025
↓ 4 callers
Method
MakePostLogoutResponse
MakePostLogoutResponse creates a SAML LogoutResponse using the HTTP-POST binding. It returns HTML text representing an HTML form that can be sent pres
service_provider.go:3190
↓ 4 callers
Method
MakeRedirectLogoutResponseWithStatus
MakeRedirectLogoutResponseWithStatus is like MakeRedirectLogoutResponse, but the response carries status instead of Success (see MakeLogoutResponseWit
service_provider.go:3143
↓ 4 callers
Method
MakeSimpleSignAuthenticationRequest
MakeSimpleSignAuthenticationRequest creates a SAML authentication request for the IDP's HTTP-POST-SimpleSign single sign-on endpoint. It returns an au
simplesign_binding.go:388
↓ 4 callers
Function
ParseRedirectResponse
ParseRedirectResponse returns the decoded SAML LogoutResponse from an HTTP-Redirect URL
testsaml/parse.go:30
↓ 4 callers
Method
Read
Read reads at most one byte past the limit, and fails if it gets it, so a message of exactly flateUncompressLimit bytes is read in full whatever the s
flate.go:29
↓ 4 callers
Function
RequireAttribute
RequireAttribute returns a middleware function that requires that the SAML attribute `name` be set to `value`. This can be used to require that a remo
samlsp/middleware.go:443
↓ 4 callers
Method
Revoke
Revoke implements SessionRevocationStore.
samlsp/session_revocation.go:309
↓ 4 callers
Method
SendErrorResponse
SendErrorResponse makes the error Response statusErr describes for req with req.MakeErrorResponse and writes it with the ResponseWriter, as ServeSSO d
identity_provider_error_response.go:124
↓ 4 callers
Method
SoapRequest
SoapRequest returns a SOAP 1.1 Envelope containing the AttributeQuery, as the SAML SOAP binding sends it (saml-bindings §3.2).
schema.go:706
↓ 4 callers
Method
TakeForm
TakeForm implements FormReplayStore.
samlsp/form_replay.go:168
↓ 4 callers
Method
TerminateSessions
TerminateSessions ends the sessions that req, a LogoutRequest from the IdP that has been validated, names (saml-core §3.7.1): those of its NameID with
samlsp/session_revocation.go:35
↓ 4 callers
Method
ValidateLogoutRequestForm
ValidateLogoutRequestForm validates a LogoutRequest received via the HTTP-POST binding. postFormData is the value of the SAMLRequest form field. It re
service_provider.go:3578
↓ 4 callers
Method
ValidateLogoutResponseForm
ValidateLogoutResponseForm returns a nil error if the logout response is valid. It does not check the response's InResponseTo; see ParseLogoutRespons
service_provider.go:3396
↓ 4 callers
Function
VerifyMetadataSignature
VerifyMetadataSignature checks that the root element of the SAML metadata in data, an EntityDescriptor or an EntitiesDescriptor, carries a valid envel
metadata_verify.go:31
↓ 4 callers
Function
WriteSOAPFault
WriteSOAPFault writes a SOAP 1.1 Fault with the faultcode Client and faultString to w, with HTTP status 500 (SOAP 1.1 §4.4 and §6.2). Use it to refuse
service_provider_soap_logout.go:206
↓ 4 callers
Function
addSignatureToDocument
(doc *etree.Document)
service_provider_test.go:1110
↓ 4 callers
Method
artifactHandler
spcovArtifactHandler acts as the IDP's artifact resolution service.
sp_coverage_parse_test.go:309
↓ 4 callers
Function
attributeValueParse
(t *testing.T, s string)
attribute_value_test.go:12
↓ 4 callers
Function
blockCipherOf
blockCipherOf returns the algorithm of the EncryptedData in encryptedID.
logout_nameid_encryption_test.go:16
↓ 4 callers
Function
checkEnvelopedSignatureNotSHA1
checkEnvelopedSignatureNotSHA1 returns an error if reject is set and the enveloped XML signature of el, its ds:Signature child, uses a SHA-1 based alg
sha1_policy.go:61
↓ 4 callers
Function
checkRedirectBindingSignature
checkRedirectBindingSignature checks the query string signature of an HTTP-Redirect binding message against the certificates returned by getCerts. Unl
redirect_binding.go:189
↓ 4 callers
Function
covCapturingOnError
covCapturingOnError records the error passed to OnError.
samlsp/middleware_coverage_test.go:67
↓ 4 callers
Function
covCookieSessionProvider
--- session_cookie.go ---
samlsp/session_coverage_test.go:170
↓ 4 callers
Function
covFixTime
covFixTime pins saml.TimeNow and saml.RandReader for the duration of the test.
samlidp/samlidp_coverage_test.go:114
↓ 4 callers
Function
cryptoHashOf
(dm DigestMethod)
xmlenc/oaep.go:36
← previous
next →
301–400 of 2,436, ranked by callers