pressly / saml Goto Github PK
View Code? Open in Web Editor NEWSAML provides tools for SAML based single sign-on in Go
License: MIT License
SAML provides tools for SAML based single sign-on in Go
License: MIT License
https://github.com/goware/saml/blob/master/files.go#L11
https://github.com/spf13/afero
https://github.com/blang/vfs
or byte buffer
or similar..
cat saml-response.xml | go run cmd/saml-response-anonymizer/main.go > anonymized-saml-response.xml
)We support redirect only at this point. I think we should support POST to IdP as well.
GET /login => POST {IdP} => POST /acs
Thoughts @xiam ?
I find using word "Middleware" very misleading in the context of this package, ie.:
middleware := sp.NewMiddleware(&serviceProvider)
middleware := idp.NewMiddleware(&identityProvider)
Both objects are not "middlewares" in my opinion. Instead, they provide end handlers,
ie. middleware.ServeMetadata
.
I think of "middleware" as of onion pattern that wraps the http.Handler
, see https://github.com/go-chi/chi#middleware-handlers.
Can we get rid of word "Middleware"?
How about this:
r := chi.NewRouter()
sp := saml.ServiceProvider{
CertFile: *flagPubCert,
KeyFile: *flagPrivKey,
IdPMetadataURL: *flagMetadataURL,
MetadataURL: *flagPublicURL + metadataPath,
AcsURL: *flagPublicURL + acsPath,
SecurityOpts: saml.SecurityOpts{
AllowSelfSignedCert: true,
},
}
r.Get("/metadata.xml", sp.MetadataHandler)
r.Post("/acs", sp.ACSHandler))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.