Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crewjam/saml
/ functions
Functions
428 in github.com/crewjam/saml
⨍
Functions
428
◇
Types & classes
124
↓ 77 callers
Method
Get
Get fetches the data stored in `key` and unmarshals it into `value`.
samlidp/store.go:11
↓ 59 callers
Method
Error
()
service_provider.go:591
↓ 59 callers
Function
mustParseURL
(s string)
samlsp/samlsp_test.go:24
↓ 52 callers
Function
NewServiceProviderTest
(t *testing.T)
service_provider_test.go:55
↓ 40 callers
Method
String
()
time.go:20
↓ 32 callers
Method
ParseResponse
ParseResponse extracts the SAML IDP response received in req, resolves artifacts when necessary, validates it, and returns the verified assertion.
service_provider.go:597
↓ 29 callers
Method
ServeHTTP
ServeHTTP implements http.Handler and serves the SAML-specific HTTP endpoints on the URIs specified by m.ServiceProvider.MetadataURL and m.ServiceProv
samlsp/middleware.go:53
↓ 28 callers
Method
Encode
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:51
↓ 26 callers
Method
New
New creates a Session from the SAML assertion.
samlsp/session.go:45
↓ 23 callers
Function
NewMiddlewareTest
(t *testing.T)
samlsp/middleware_test.go:52
↓ 21 callers
Function
NewIdentifyProviderTest
(t *testing.T)
identity_provider_test.go:77
↓ 20 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:281
↓ 19 callers
Method
Bytes
Bytes returns a byte array representation of the LogoutRequest
schema.go:144
↓ 17 callers
Method
Decode
Decode parses the serialized session that may have been returned by Encode and returns a Session.
samlsp/session.go:55
↓ 17 callers
Method
Validate
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:390
↓ 12 callers
Method
Metadata
Metadata returns the service provider metadata
service_provider.go:144
↓ 12 callers
Method
Printf
Printf prints to the logger using the format.
logger/logger.go:11
↓ 11 callers
Method
RequireAccount
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:103
↓ 9 callers
Method
Close
()
flate.go:29
↓ 9 callers
Function
ParseRedirectRequest
ParseRedirectRequest returns the decoded SAML AuthnRequest from an HTTP-Redirect URL
testsaml/parse.go:13
↓ 9 callers
Method
makeTrackedRequest
(id string)
samlsp/middleware_test.go:112
↓ 8 callers
Method
MakeAssertion
MakeAssertion constructs an assertion from session and the request and assigns it to req.Assertion.
identity_provider.go:80
↓ 7 callers
Function
Decrypt
Decrypt decrypts the encrypted data using the provided key. If the data are encrypted using AES or 3DEC, then the key should be a []byte. If the data
xmlenc/decrypt.go:57
↓ 7 callers
Method
MakeRedirectAuthenticationRequest
MakeRedirectAuthenticationRequest creates a SAML authentication request using the HTTP-Redirect binding. It returns a URL that we will redirect the us
service_provider.go:239
↓ 7 callers
Function
NewServerTest
(t *testing.T)
samlidp/samlidp_test.go:80
↓ 6 callers
Function
FetchMetadata
FetchMetadata returns metadata from an IDP metadata URL.
samlsp/fetch_metadata.go:53
↓ 6 callers
Method
Post
Post returns an HTML form suitable for using the HTTP-POST binding with the request
service_provider.go:511
↓ 6 callers
Method
Put
Put marshals `value` and stores it in `key`.
samlidp/store.go:14
↓ 6 callers
Method
Redirect
Redirect returns a URL suitable for using the redirect binding with the request
service_provider.go:248
↓ 6 callers
Function
firstSet
(a, b string)
service_provider.go:1579
↓ 6 callers
Function
mustParsePrivateKey
(pemStr []byte)
samlsp/samlsp_test.go:32
↓ 6 callers
Function
randomBytes
(n int)
util.go:24
↓ 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:82
↓ 5 callers
Method
GetSSOBindingLocation
GetSSOBindingLocation returns URL for the IDP's Single Sign On Service binding of the specified type (HTTPRedirectBinding or HTTPPostBinding)
service_provider.go:294
↓ 5 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/store.go:22
↓ 5 callers
Method
MakeAssertionEl
MakeAssertionEl sets `AssertionEl` to a signed, possibly encrypted, version of `Assertion`.
identity_provider.go:832
↓ 5 callers
Method
MakeAuthenticationRequest
MakeAuthenticationRequest produces a new AuthnRequest object to send to the idpURL that uses the specified binding (HTTPRedirectBinding or HTTPPostBin
service_provider.go:400
↓ 5 callers
Method
ServeSSO
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:222
↓ 5 callers
Function
mustParseCertificate
(pemStr []byte)
samlsp/samlsp_test.go:44
↓ 5 callers
Method
responseDom
()
service_provider_test.go:954
↓ 5 callers
Function
unmarshalElement
unmarshalElement serializes el into v by serializing el and then parsing it with xml.Unmarshal.
service_provider.go:1668
↓ 5 callers
Method
validateSignature
validateSignature returns nil iff the Signature embedded in the element is valid
service_provider.go:1084
↓ 4 callers
Function
DefaultSessionProvider
DefaultSessionProvider returns the default SessionProvider for the provided options, a CookieSessionProvider configured to store sessions in a cookie.
samlsp/new.go:50
↓ 4 callers
Method
Element
Element returns an XML element representation of n.
service_provider.go:33
↓ 4 callers
Method
Encrypt
(key interface{}, plaintext []byte, nonce []byte)
xmlenc/xmlenc.go:21
↓ 4 callers
Method
GetSLOBindingLocation
GetSLOBindingLocation returns URL for the IDP's Single Log Out Service binding of the specified type (HTTPRedirectBinding or HTTPPostBinding)
service_provider.go:320
↓ 4 callers
Method
MakeArtifactResolveRequest
MakeArtifactResolveRequest produces a new ArtifactResolve object to send to the idp's Artifact resolver
service_provider.go:377
↓ 4 callers
Method
MakeResponse
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:1022
↓ 4 callers
Function
New
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:140
↓ 4 callers
Function
NewIdpAuthnRequest
NewIdpAuthnRequest returns a new IdpAuthnRequest for the given HTTP request to the authorization service.
identity_provider.go:352
↓ 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:221
↓ 4 callers
Method
ServeIDPInitiated
ServeIDPInitiated handes an IDP-initiated authorization request. Requests of this type require us to know a registered service provider and (optionall
identity_provider.go:263
↓ 4 callers
Method
replaceDestination
(newDestination string)
service_provider_test.go:926
↓ 3 callers
Method
Algorithm
()
xmlenc/xmlenc.go:30
↓ 3 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:30
↓ 3 callers
Method
GetSession
GetSession returns the current Session associated with the request, or ErrNoSession if there is no valid session.
samlsp/session.go:38
↓ 3 callers
Function
GetSigningContext
GetSigningContext returns a dsig.SigningContext initialized based on the Service Provider's configuration
service_provider.go:435
↓ 3 callers
Method
Handler
Handler returns an http.Handler that serves the metadata and SSO URLs
identity_provider.go:191
↓ 3 callers
Method
Metadata
Metadata returns the metadata structure for this identity provider.
identity_provider.go:113
↓ 3 callers
Function
OAEP
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:128
↓ 3 callers
Method
ParseXMLArtifactResponse
ParseXMLArtifactResponse validates the SAML Artifact resolver response and returns the verified assertion. This function handles verifying the digita
service_provider.go:681
↓ 3 callers
Method
Println
Println prints new line.
logger/logger.go:15
↓ 3 callers
Method
Read
(p []byte)
flate.go:20
↓ 3 callers
Function
RegisterDecrypter
RegisterDecrypter registers the specified decrypter to that it can be used with Decrypt().
xmlenc/xmlenc.go:47
↓ 3 callers
Function
SessionFromContext
SessionFromContext returns the session associated with ctx, or nil if no session are associated
samlsp/session.go:64
↓ 3 callers
Method
WriteResponse
WriteResponse writes the `Response` to the http.ResponseWriter. If `Response` is not already set, it calls MakeResponse to produce it.
identity_provider.go:941
↓ 3 callers
Function
addSignatureToDocument
(doc *etree.Document)
service_provider_test.go:960
↓ 3 callers
Function
elementToBytes
(el *etree.Element)
service_provider.go:1649
↓ 3 callers
Function
findChildren
findChildren returns all the elements matching childNS/childTag that are direct children of parentEl.
service_provider.go:1587
↓ 3 callers
Function
findOneChild
findOneChild finds the specified child element. Returns an error if the element doesn't exist.
service_provider.go:1618
↓ 3 callers
Function
getCiphertext
(encryptedKey *etree.Element)
xmlenc/decrypt.go:70
↓ 3 callers
Function
getSPMetadata
(r io.Reader)
samlidp/util.go:23
↓ 2 callers
Function
AttributeFromContext
AttributeFromContext is a convenience method that returns the named attribute from the session, if available.
samlsp/session.go:79
↓ 2 callers
Method
Decrypt
(key interface{}, ciphertextEl *etree.Element)
xmlenc/xmlenc.go:31
↓ 2 callers
Function
DefaultSessionCodec
DefaultSessionCodec returns the default SessionCodec for the provided options, a JWTSessionCodec configured to issue signed tokens.
samlsp/new.go:38
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:181
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:336
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:1082
↓ 2 callers
Method
Element
Element returns an etree.Element representing the object in XML form.
schema.go:1267
↓ 2 callers
Method
GetArtifactBindingLocation
GetArtifactBindingLocation returns URL for the IDP's Artifact binding of the specified type
service_provider.go:307
↓ 2 callers
Method
GetAttributes
()
samlsp/session.go:18
↓ 2 callers
Method
GetServiceProvider
GetServiceProvider returns the Service Provider metadata for the service provider ID, which is typically the service provider's metadata URL. If an ap
identity_provider.go:71
↓ 2 callers
Method
MakeLogoutRequest
MakeLogoutRequest produces a new LogoutRequest object for idpURL.
service_provider.go:1187
↓ 2 callers
Method
MakeLogoutResponse
MakeLogoutResponse produces a new LogoutResponse object for idpURL and logoutRequestID.
service_provider.go:1297
↓ 2 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:502
↓ 2 callers
Method
MakeRedirectLogoutRequest
MakeRedirectLogoutRequest creates a SAML authentication request using the HTTP-Redirect binding. It returns a URL that we will redirect the user to in
service_provider.go:1216
↓ 2 callers
Method
MarshalText
MarshalText implements encoding.TextMarshaler
time.go:12
↓ 2 callers
Function
New
New returns a new Server
samlidp/samlidp.go:48
↓ 2 callers
Method
ParseXMLResponse
ParseXMLResponse parses and validates the SAML IDP response and returns the verified assertion. This function handles decrypting the message, verifyi
service_provider.go:791
↓ 2 callers
Method
ServeMetadata
ServeMetadata handles requests for the SAML metadata endpoint.
samlsp/middleware.go:68
↓ 2 callers
Method
SoapRequest
SoapRequest returns a SOAP Envelope contining the ArtifactResolve request
schema.go:366
↓ 2 callers
Function
appendPadding
(buf []byte, blockSize int)
xmlenc/cbc.go:168
↓ 2 callers
Method
decryptElement
(encryptedEl *etree.Element)
service_provider.go:959
↓ 2 callers
Method
nameIDFormat
()
service_provider.go:1443
↓ 2 callers
Function
newSaferFlateReader
10MB
flate.go:11
↓ 2 callers
Method
parseAssertion
(assertionEl *etree.Element, possibleRequestIDs []string, now time.Time, signatureRequirement signatureRequire
service_provider.go:991
↓ 2 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:837
↓ 2 callers
Method
validateAssertion
validateAssertion checks that the conditions specified in assertion match the requirements to accept. If validation fails, it returns an error describ
service_provider.go:1016
↓ 2 callers
Method
validateLogoutResponse
validateLogoutResponse validates the LogoutResponse fields. Returns a nil error if the LogoutResponse is valid.
service_provider.go:1560
next →
1–100 of 428, ranked by callers