mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 05:50:50 +00:00
nhj
more
This commit is contained in:
21
unified-ai-platform/node_modules/jsonwebtoken/LICENSE
generated
vendored
Normal file
21
unified-ai-platform/node_modules/jsonwebtoken/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
30
unified-ai-platform/node_modules/jsonwebtoken/decode.js
generated
vendored
Normal file
30
unified-ai-platform/node_modules/jsonwebtoken/decode.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
var jws = require('jws');
|
||||
|
||||
module.exports = function (jwt, options) {
|
||||
options = options || {};
|
||||
var decoded = jws.decode(jwt, options);
|
||||
if (!decoded) { return null; }
|
||||
var payload = decoded.payload;
|
||||
|
||||
//try parse the payload
|
||||
if(typeof payload === 'string') {
|
||||
try {
|
||||
var obj = JSON.parse(payload);
|
||||
if(obj !== null && typeof obj === 'object') {
|
||||
payload = obj;
|
||||
}
|
||||
} catch (e) { }
|
||||
}
|
||||
|
||||
//return header if `complete` option is enabled. header includes claims
|
||||
//such as `kid` and `alg` used to select the key within a JWKS needed to
|
||||
//verify the signature
|
||||
if (options.complete === true) {
|
||||
return {
|
||||
header: decoded.header,
|
||||
payload: payload,
|
||||
signature: decoded.signature
|
||||
};
|
||||
}
|
||||
return payload;
|
||||
};
|
||||
0
unified-ai-platform/node_modules/jsonwebtoken/index.js
generated
vendored
Normal file
0
unified-ai-platform/node_modules/jsonwebtoken/index.js
generated
vendored
Normal file
3
unified-ai-platform/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
generated
vendored
Normal file
3
unified-ai-platform/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const semver = require('semver');
|
||||
|
||||
module.exports = semver.satisfies(process.version, '>=15.7.0');
|
||||
Reference in New Issue
Block a user