formacao
This commit is contained in:
-1
@@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
@@ -46,7 +45,7 @@ const jwt = (options) => {
|
||||
let token;
|
||||
if (credentials) {
|
||||
const parts = credentials.split(/\s+/);
|
||||
if (parts.length !== 2) {
|
||||
if (parts.length !== 2 || parts[0].toLowerCase() !== "bearer") {
|
||||
const errDescription = "invalid credentials structure";
|
||||
throw new import_http_exception.HTTPException(401, {
|
||||
message: errDescription,
|
||||
|
||||
Reference in New Issue
Block a user