Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 1.18 KB

README.md

File metadata and controls

42 lines (34 loc) · 1.18 KB

WSSE Token

npm npm license npm downloads build status

Web Services Security Extension (WSSE) Username Authentication Token

Install via npm

npm install --save wsse-token

Usage

var WSSEToken = require( 'wsse-token' )
var token = new WSSEToken({
  // Credentials
  user: 'example',
  password: 'secret',
  // Byte-length and encoding of the nonce (optional)
  nonceBytes: 16,
  nonceEncoding: 'hex',
  // Digest options (optional)
  digestAlgorithm: 'sha1',
  digestEncoding: 'hex',
  digestBase64: true,
})
token.toString()
'UsernameToken Username="example", PasswordDigest="dc8b87d1786f37261ae2a5f7f0940fd650635d4a", Nonce="69dc375f3c5d6b24a45801962ad74812", Created="2019-07-11T16:40:43.125Z"'