Web Services Security Extension (WSSE) Username Authentication Token
Install via npm
npm install --save wsse-token
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"'