You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

samlify

Package Overview
Dependencies
Maintainers
1
Versions
67
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.10.1
latest
Source
npmnpm
Version published
Weekly downloads
215K
3.66%
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

nodejs

FAQs

Package last updated on 06 Jul 2025

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