Socket
Book a DemoInstallSign in
Socket

drachtio-mw-auth-parser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drachtio-mw-auth-parser

drachtio middleware for parsing SIP Authorization header

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

drachtio-mw-auth-parser Build Status NPM version

drachtio middleware for parsing SIP Authorization header, supporting Digest and Basic authorization

Usage

const Srf = require('drachtio-srf');
const srf = new Srf();
const authParser = require('drachtio-mw-auth-parser') ;

srf.connect({...}) ;

srf.use(authParser) ;

srf.register(( req, res ) => {
  console.log(req.authorization) ;
  /*
    Digest: username="103482",realm="sip.drachtio.org",nonce="df24fd41-4fc5-416f-b163-90f774ca0358" \
      uri="sip:73.15.46.10:6060",algorithm=MD5,response="a4881ad854cc0677158206ac9fa90e3b", \
      qop=auth,nc=00000032,cnonce="ea5cec20"

    console.log =>
    {
      scheme: 'digest',
      username: '103482',
      realm: 'sip.drachtio.org',
      nonce: 'df24fd41-4fc5-416f-b163-90f774ca0358',
      uri: 'sip:72.1.46.10:6060',
      algorithm: 'MD5',
      response: 'a4881ad854cc0677158206ac9fa90e3b',
      qop: 'auth',
      nc: '00000032',
      cnonce: 'ea5cec20'
    }
   */
}) ;

Keywords

sip

FAQs

Package last updated on 03 Jun 2018

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