@deshartman/check-bearer
Advanced tools
Comparing version 1.0.0 to 1.0.1
import jwt from 'jsonwebtoken'; | ||
/** | ||
* This is a utility class that checks the HTTP header for a "Bearer: JWT" and compares the JWT validity against | ||
* the Twilio API Key Secret. This is because Twilio JWTs are created using and API Key Secret, so a good way to secure | ||
* a client bearer on the server side. | ||
* | ||
* Constructor: | ||
* @param {string} headers - The HTTP headers containing authorization information. | ||
* @param {string} secret - The Twilio API Key Secret. | ||
* | ||
*/ | ||
export default class CheckBearer { | ||
@@ -4,0 +14,0 @@ constructor(headers = {}, secret = "") { |
{ | ||
"name": "@deshartman/check-bearer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Utility: Checks the Twilio token (JWT) in the Auth Bearer header using the Twilio API secret key", | ||
@@ -11,2 +11,3 @@ "main": "checkBearer.js", | ||
"license": "ISC", | ||
"type": "module", | ||
"dependencies": { | ||
@@ -13,0 +14,0 @@ "jsonwebtoken": "^8.5.1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2231
38
Yes