New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

samlify

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

samlify

High-level API for Single Sign On (SAML 2.0)

  • 2.8.0-rc1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
144K
decreased by-12.45%
Maintainers
1
Weekly downloads
 
Created

What is samlify?

Samlify is a Node.js library that provides a comprehensive solution for implementing SAML (Security Assertion Markup Language) authentication. It allows developers to easily integrate SAML-based Single Sign-On (SSO) into their applications, supporting both Identity Provider (IdP) and Service Provider (SP) roles.

What are samlify's main functionalities?

Service Provider (SP) Configuration

This feature allows you to configure a Service Provider (SP) in your application. The code sample demonstrates how to set up an SP with a specific entity ID and assertion consumer service URL.

{
  "const saml = require('samlify');",
  "const sp = saml.ServiceProvider({",
  "  entityID: 'sp.example.com',",
  "  assertionConsumerService: {",
  "    url: 'https://sp.example.com/acs',",
  "    binding: saml.Constants.namespace.binding.post",
  "  }",
  "});"
}

Identity Provider (IdP) Configuration

This feature allows you to configure an Identity Provider (IdP). The code sample shows how to set up an IdP with a specific entity ID and single sign-on service URL.

{
  "const idp = saml.IdentityProvider({",
  "  entityID: 'idp.example.com',",
  "  singleSignOnService: {",
  "    url: 'https://idp.example.com/sso',",
  "    binding: saml.Constants.namespace.binding.redirect",
  "  }",
  "});"
}

SAML Request Generation

This feature enables the generation of SAML authentication requests. The code sample demonstrates how to create a login request from the Service Provider to the Identity Provider using the redirect binding.

{
  "const { id, context } = sp.createLoginRequest(idp, 'redirect');"
}

SAML Response Validation

This feature allows the validation of SAML responses received from the Identity Provider. The code sample shows how to parse and validate a login response using the POST binding.

{
  "sp.parseLoginResponse(idp, 'post', {",
  "  body: req.body",
  "}).then((parseResult) => {",
  "  console.log(parseResult);",
  "});"
}

Other packages similar to samlify

Keywords

FAQs

Package last updated on 12 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc