This Project is an example for saml2 integration with saml-idp、auth0、OKTA.
🔥 Support Upload Metadata...
If you need stronger security, please use credentials for mutual security verification
generate service provider's cert
cd initial
openssl req -newkey rsa:4096 -x509 -nodes -sha256 -keyout sp.pem -out sp.crt
npm run start:dev
git clone https://github.com/mcguinness/saml-idp
|- saml2-express-ts-sample
|- ...
|- saml-idp
|- ...
cd saml-idp
npm start -- --host=localhost \
--port=5857 \
--acsUrl=http://localhost:5858/auth/saml2/acs \
--sloUrl=http://localhost:5858/auth/saml2/sls \
--aud=http://localhost:5858/auth/saml2/acs \
--enc=true \
--encCert="../saml2-express-ts-sample/initial/sp.cer" \
--encKey="../saml2-express-ts-sample/initial/sp.key"
When the user directly accesses the service provider, sp should redirect to the idp login follow sso.
- GET
auth/saml2
: Redirect to IDP
- GET
/auth/saml2/metadata
: Metadata endpoint - POST
/auth/saml2/acs
: Assertion Consumer Service endpoint - GET
/auth/saml2/sls
: Single Logout Service endpoint
- PUT
/auth/saml2/idp-metadata
- body
- url(string):
idp's metdata url
- url(string):
- body
curl -XPUT localhost:5858/auth/saml2/idp-metadata -d '{"url": "http://localhost:5857/metadata"}' -H 'Content-Type: application/json'