MCPcopy Create free account

hub / github.com/crewjam/saml / functions

Functions2,436 in github.com/crewjam/saml

↓ 325 callersMethodString
()
time.go:40
↓ 277 callersMethodGet
Get fetches the data stored in `key` and unmarshals it into `value`.
samlidp/store.go:11
↓ 222 callersMethodLen
()
samlidp/session_expiry.go:36
↓ 197 callersMethodNew
New creates a Session from the SAML assertion.
samlsp/session.go:58
↓ 190 callersMethodElement
Element returns an etree.Element representing the object in XML form.
schema.go:440
↓ 182 callersFunctionspcovSetup
spcovSetup pins TimeNow, Clock and RandReader (restoring them afterwards) and returns a service provider that trusts a programmatically built IDP.
sp_coverage_helpers_test.go:41
↓ 165 callersMethodError
()
errors.go:173
↓ 128 callersFunctionmustParseURL
(s string)
samlsp/samlsp_test.go:24
↓ 98 callersMethodServeHTTP
ServeHTTP implements http.Handler and serves the SAML-specific HTTP endpoints on the URIs specified by m.ServiceProvider.MetadataURL, m.ServiceProvide
samlsp/middleware.go:115
↓ 96 callersFunctionspcovSerialize
(t *testing.T, el *etree.Element)
sp_coverage_helpers_test.go:177
↓ 86 callersMethodEncode
Encode returns a serialized version of the Session. Note: When implementing this function, it is reasonable to expect that Session is of the exact ty
samlsp/session.go:64
↓ 81 callersMethodMetadata
Metadata returns the service provider metadata
service_provider.go:562
↓ 81 callersFunctionspcovPrivateErr
spcovPrivateErr asserts err is an *InvalidResponseError and returns its PrivateErr.
sp_coverage_helpers_test.go:212
↓ 78 callersFunctionclassify
(err error, kinds ...error)
errors.go:179
↓ 70 callersMethodHeader
()
samlsp/middleware_soap_logout.go:69
↓ 70 callersFunctionNewIdentityProviderTest
(t *testing.T, opts ...idpTestOpts)
identity_provider_test.go:100
↓ 69 callersMethodassertion
()
sp_coverage_helpers_test.go:110
↓ 66 callersFunctionNewServiceProviderTest
(t *testing.T)
service_provider_test.go:64
↓ 63 callersMethodidpSign
(t *testing.T, el *etree.Element)
sp_coverage_helpers_test.go:105
↓ 61 callersMethodBytes
Bytes returns a byte array representation of the LogoutRequest
schema.go:295
↓ 61 callersMethodParseResponse
ParseResponse extracts the SAML IDP response received in req, resolves artifacts when necessary, validates it, and returns the verified assertion. req
service_provider.go:1323
↓ 60 callersMethodHeader
()
samlidp/samlidp_coverage_test.go:79
↓ 58 callersMethodValidate
Validate checks that the authentication request is valid and assigns the AuthnRequest and Metadata properties. Returns a non-nil error if the request
identity_provider.go:1095
↓ 52 callersMethodMakeAuthenticationRequest
MakeAuthenticationRequest produces a new AuthnRequest object to send to the idpURL that uses the specified binding (HTTPRedirectBinding or HTTPPostBin
service_provider.go:979
↓ 52 callersMethodParseXMLResponse
ParseXMLResponse parses and validates the SAML IDP response and returns the verified assertion. This function handles decrypting the message, verifyi
service_provider.go:1569
↓ 51 callersFunctionNewMiddlewareTest
(t *testing.T)
samlsp/middleware_test.go:60
↓ 45 callersMethodresponse
()
sp_coverage_helpers_test.go:138
↓ 44 callersMethodAlgorithm
()
xmlenc/xmlenc.go:35
↓ 42 callersMethodMakeAssertion
MakeAssertion constructs an assertion from session and the request and assigns it to req.Assertion.
identity_provider.go:112
↓ 41 callersMethodServeSSO
ServeSSO handles SAML auth requests. When it gets a request for a user that does not have a valid session, then it prompts the user via XXX. If the
identity_provider.go:772
↓ 40 callersMethodlogoutRequest
()
redirect_binding_test.go:88
↓ 39 callersMethodEncrypt
(key interface{}, plaintext []byte, nonce []byte)
xmlenc/xmlenc.go:26
↓ 39 callersFunctioncovNewServer
covNewServer creates a Server backed by store, pinning time/randomness.
samlidp/samlidp_coverage_test.go:127
↓ 39 callersFunctionnewSLOTest
(t *testing.T)
identity_provider_logout_test.go:64
↓ 38 callersMethodlogin
login creates the user and logs them in, returning the session and the session cookie.
samlidp/logout_test.go:57
↓ 36 callersFunctionNewServerTest
(t *testing.T)
samlidp/samlidp_test.go:78
↓ 36 callersMethodRedirect
Redirect returns a URL suitable for using the redirect binding with the request. If sp.SignatureMethod is set, the query string is signed as described
service_provider.go:712
↓ 35 callersMethodMakeRedirectAuthenticationRequest
MakeRedirectAuthenticationRequest creates a SAML authentication request using the HTTP-Redirect binding. It returns a URL that we will redirect the us
service_provider.go:700
↓ 34 callersMethodPrintf
Printf prints to the logger using the format.
logger/logger.go:12
↓ 34 callersFunctionnewLogoutTest
newLogoutTest returns a middleware whose IDP supports single logout with the given bindings, and which trusts ../testdata/idp_cert.pem.
samlsp/middleware_logout_test.go:44
↓ 33 callersMethodDecode
Decode parses the serialized session that may have been returned by Encode and returns a Session.
samlsp/session.go:68
↓ 32 callersMethodMakeLogoutRequest
MakeLogoutRequest produces a new LogoutRequest object for idpURL. If sp.SignatureMethod is set, the request carries an enveloped XML signature, which
service_provider.go:2857
↓ 32 callersFunctionidpcovNewTest
idpcovNewTest wraps NewIdentityProviderTest and restores the package globals it mutates once the test finishes.
idp_coverage_test.go:35
↓ 32 callersFunctionmustParsePrivateKey
(pemStr []byte)
samlsp/samlsp_test.go:32
↓ 31 callersFunctionmustParseCertificate
(pemStr []byte)
samlsp/samlsp_test.go:44
↓ 31 callersMethodserve
(r *http.Request)
identity_provider_logout_test.go:142
↓ 31 callersFunctionunmarshalElement
unmarshalElement serializes el into v by serializing el and then parsing it with xml.Unmarshal. el is untrusted: attribute fields are read only from
service_provider.go:3880
↓ 30 callersFunctionOAEP
OAEP returns a version of RSA that implements RSA in OAEP-MGF1P mode. By default the block cipher used is AES-256 CBC and the digest method is SHA-256
xmlenc/pubkey.go:177
↓ 29 callersMethodWrite
([]byte)
samlidp/samlidp_coverage_test.go:86
↓ 29 callersFunctionaqSetup
aqSetup returns the spcovSetup environment with an IdP that also publishes an AttributeAuthorityDescriptor.
service_provider_attribute_query_test.go:38
↓ 29 callersMethodnow
now returns the current time as seen by this ServiceProvider.
service_provider.go:529
↓ 28 callersFunctionnewPropagationTest
(t *testing.T)
identity_provider_logout_propagation_test.go:82
↓ 28 callersMethodsessionCookie
sessionCookie returns a session cookie for alice, with the given SessionIndexes.
samlsp/middleware_logout_test.go:101
↓ 27 callersFunctionDecrypt
Decrypt decrypts the encrypted data using the provided key. If the data are encrypted using AES, then the key should be a []byte. If the data are encr
xmlenc/decrypt.go:78
↓ 26 callersMethodGetSSOBindingLocation
GetSSOBindingLocation returns URL for the IDP's Single Sign On Service binding of the specified type (HTTPRedirectBinding, HTTPPostBinding or HTTPPost
service_provider.go:728
↓ 26 callersFunctionNewIdpAuthnRequest
NewIdpAuthnRequest returns a new IdpAuthnRequest for the given HTTP request to the authorization service. A GET request carries the request with the
identity_provider.go:978
↓ 24 callersMethodFatalf
Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
logger/logger.go:20
↓ 24 callersFunctionValidate
Validate returns an error if any token of data does not survive a round trip through encoding/xml unchanged, or if data nests elements more than MaxDe
internal/xmlroundtrip/validate.go:85
↓ 24 callersMethodredirectRequest
redirectRequest returns an HTTP request carrying req with the HTTP-Redirect binding, signed with a query string signature if the SP has a SignatureMet
identity_provider_logout_test.go:111
↓ 23 callersMethodRequireAccount
RequireAccount is HTTP middleware that requires that each request be associated with a valid session. If the request is not associated with a valid se
samlsp/middleware.go:207
↓ 23 callersMethodaqQuery
(t *testing.T)
service_provider_attribute_query_test.go:47
↓ 23 callersFunctionidpErrNewTest
idpErrNewTest returns an IdP test whose SP trusts the IdP's (expired) test certificate, so that the SP can parse what the IdP sends.
idp_error_response_test.go:19
↓ 20 callersMethodGetSLOBindingLocation
GetSLOBindingLocation returns URL for the IDP's Single Log Out Service binding of the specified type (HTTPRedirectBinding or HTTPPostBinding), or "" i
service_provider.go:774
↓ 20 callersMethodParseLogoutResponse
ParseLogoutResponse validates the LogoutResponse content from the request, which may use the HTTP-Redirect, HTTP-POST or HTTP-POST-SimpleSign binding,
service_provider.go:3326
↓ 20 callersMethodParseXMLAttributeQueryResponse
ParseXMLAttributeQueryResponse validates soapResponseXML, the SOAP envelope an attribute authority returned for query, and returns the attributes it c
service_provider_attribute_query.go:260
↓ 19 callersMethodClose
()
flate.go:41
↓ 19 callersMethodFatal
Fatal is equivalent to Print() followed by a call to os.Exit(1).
logger/logger.go:18
↓ 19 callersFunctionNew
New creates a new Middleware with the default providers for the given options. You can customize the behavior of the middleware in more detail by rep
samlsp/new.go:551
↓ 19 callersMethodspecSigParse
(t *testing.T, responseEl *etree.Element)
spec_signature_encryption_test.go:163
↓ 19 callersMethodvalidateAssertion
(assertion *Assertion, possibleRequestIDs []string, now time.Time)
service_provider.go:2164
↓ 18 callersMethodDecrypt
(key interface{}, ciphertextEl *etree.Element)
xmlenc/xmlenc.go:36
↓ 18 callersMethodGetSession
GetSession returns the current Session associated with the request, or an error matching ErrNoSession (as determined by errors.Is) if there is no vali
samlsp/session.go:51
↓ 18 callersFunctionIsNil
IsNil reports whether key is nil, or is a non-nil interface holding a nil value such as (*rsa.PrivateKey)(nil) or a nil ed25519.PrivateKey. A plain ==
internal/signerutil/signerutil.go:12
↓ 18 callersMethodRedirectLogoutRequestURL
RedirectLogoutRequestURL returns the URL that sends req to its Destination with the HTTP-Redirect binding. Use it instead of MakeRedirectLogoutRequest
service_provider.go:2975
↓ 18 callersFunctionWithSessionIndex
WithSessionIndex sets the SessionIndex element of a LogoutRequest, which identifies the session at the IDP to terminate (saml-core-2.0-os section 3.7.
service_provider.go:2827
↓ 17 callersMethodHandleStartLogout
HandleStartLogout starts SP initiated single logout. It deletes the local session and sends the browser to the IDP with a LogoutRequest for the sessio
samlsp/middleware_logout.go:71
↓ 17 callersMethodServeIDPInitiated
ServeIDPInitiated handes an IDP-initiated authorization request. Requests of this type require us to know a registered service provider and (optionall
identity_provider.go:842
↓ 17 callersMethodValidateLogoutRequest
ValidateLogoutRequest validates a LogoutRequest sent by the IDP (IDP initiated single logout), using the HTTP-Redirect, HTTP-POST or HTTP-POST-SimpleS
service_provider.go:3538
↓ 17 callersMethodaqSOAP
(t *testing.T, query *AttributeQuery, o aqOptions)
service_provider_attribute_query_test.go:119
↓ 17 callersFunctionassertSessionDeleted
assertSessionDeleted checks that resp expires the session cookie.
samlsp/middleware_logout_test.go:198
↓ 17 callersFunctionpostForm
postForm posts the hidden fields of form to its action and returns the parsed request.
simplesign_idp_test.go:55
↓ 17 callersFunctionsimpleSignPost
simpleSignPost returns a parsed POST request to target carrying v.
simplesign_binding_test.go:57
↓ 17 callersFunctionspcovSOAPEnvelope
(body *etree.Element)
sp_coverage_helpers_test.go:204
↓ 17 callersFunctionvalidAssertion
validAssertion is an assertion that validateAssertion accepts for requiredConditionsSP, so each test removes exactly one part of it.
required_conditions_test.go:14
↓ 16 callersMethodError
()
xmlenc/decrypt.go:47
↓ 16 callersFunctionParseRedirectRequest
ParseRedirectRequest returns the decoded SAML AuthnRequest from an HTTP-Redirect URL
testsaml/parse.go:25
↓ 16 callersMethodpostToSLO
(form url.Values, cookies ...*http.Cookie)
samlsp/middleware_logout_test.go:138
↓ 16 callersFunctionrequiredConditionsSP
()
required_conditions_test.go:34
↓ 16 callersMethodstartLogout
startLogout calls HandleStartLogout with cookie and ctx.
samlsp/soap_start_logout_test.go:166
↓ 15 callersMethodPut
Put marshals `value` and stores it in `key`.
samlidp/store.go:14
↓ 15 callersMethodWriteHeader
(code int)
samlidp/samlidp_coverage_test.go:90
↓ 15 callersFunctioncovServe
covServe runs a request through the server's mux and returns the status code.
samlidp/handlers_coverage_test.go:16
↓ 15 callersFunctionelementToBytes
elementToBytes serializes el as a standalone document. Namespace declarations that el inherits from its ancestors are copied onto the serialized root,
service_provider.go:3826
↓ 15 callersMethodspecSigResponse
specSigResponse wraps the given assertion-level children in an unsigned Response built from e.response().
spec_signature_encryption_test.go:155
↓ 14 callersMethodList
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/store.go:22
↓ 14 callersMethodMakeResponse
MakeResponse creates and assigns a new SAML response in ResponseEl. `Assertion` must be non-nil. If MakeAssertionEl() has not been called, this functi
identity_provider.go:1875
↓ 14 callersMethodaddSOAPParticipant
addSOAPParticipant adds to pt an SP that lists an https SOAP SingleLogoutService after the given front-channel bindings. Unless pt.idp already has an
identity_provider_logout_soap_test.go:42
↓ 14 callersMethodencryptedAssertion
encryptedAssertion encrypts plaintext for the SP and wraps it in an EncryptedAssertion.
sp_coverage_helpers_test.go:163
↓ 14 callersMethodlogoutRequest
()
samlsp/middleware_logout_test.go:186
↓ 14 callersFunctionnewKeyAndCert
newKeyAndCert returns an RSA key and a self-signed certificate for it, as Encrypt takes the recipient's certificate and Decrypt its key.
xmlenc/key_transport_test.go:18
next →1–100 of 2,436, ranked by callers