mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 21:39:37 +00:00
Remove jsonwebtoken dependency
This commit is contained in:
parent
b61ecefce4
commit
954cf3e14e
29 changed files with 2130 additions and 93 deletions
27
server/libs/jws/index.js
Normal file
27
server/libs/jws/index.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// used by jsonwebtoken
|
||||
// Source: https://github.com/auth0/node-jws
|
||||
//
|
||||
|
||||
/*global exports*/
|
||||
var SignStream = require('./lib/sign-stream');
|
||||
var VerifyStream = require('./lib/verify-stream');
|
||||
|
||||
var ALGORITHMS = [
|
||||
'HS256', 'HS384', 'HS512',
|
||||
'RS256', 'RS384', 'RS512',
|
||||
'PS256', 'PS384', 'PS512',
|
||||
'ES256', 'ES384', 'ES512'
|
||||
];
|
||||
|
||||
exports.ALGORITHMS = ALGORITHMS;
|
||||
exports.sign = SignStream.sign;
|
||||
exports.verify = VerifyStream.verify;
|
||||
exports.decode = VerifyStream.decode;
|
||||
exports.isValid = VerifyStream.isValid;
|
||||
exports.createSign = function createSign(opts) {
|
||||
return new SignStream(opts);
|
||||
};
|
||||
exports.createVerify = function createVerify(opts) {
|
||||
return new VerifyStream(opts);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue