JSPM

node-matrix-auth

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q29506F
  • License MIT

Authentication with Squiz Matrix from Node.js

Package Exports

  • node-matrix-auth

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-matrix-auth) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-matrix-auth

Authentication with Squiz Matrix from Node.js

Example

var matrixAuth = require('node-matrix-auth');

matrixAuth({
  auth: 'admin:pass',
  admin: 'http://mysource.matrix/_admin',
  wsdl: 'http://mysource.matrix/_web_services/soap?wsdl'
}, function(err, auth) {
  if (err)
    return console.error(err);

  console.log(auth);
});

matrixAuth will return an object with the following properties:

  • auth: The user authentication information
  • admin: The result of passing opts.admin into url.parse
  • wsdl: The result of passing opts.wsdl into url.parse
  • nonce: The nonce token used to sign certain requests to Matrix.
  • cookie: The session cookie used to sign requests to Matrix.
  • sessionId: The ID assigned to the authenticated session.
  • sessionKey: The key assigned to the authenticated session.

Requirements

  • Squiz Matrix ~4.18.0
  • A user accout with backend or greater privillages
  • A SOAP API with the LoginUser service enabled

License

MIT