@adonisjs/auth 9.4.0 → 9.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{chunk-U24HGFIR.js → chunk-2VRS2VHB.js} +1 -1
- package/build/{chunk-RKU6NS6C.js → chunk-JFTYQIKS.js} +1 -1
- package/build/index.js +2 -2
- package/build/modules/access_tokens_guard/main.js +4 -4
- package/build/modules/session_guard/main.js +2 -2
- package/build/providers/auth_provider.js +2 -2
- package/build/src/errors.d.ts +2 -2
- package/build/src/plugins/japa/api_client.js +1 -1
- package/build/src/plugins/japa/browser_client.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import "../../chunk-UXA4FHST.js";
|
|
5
5
|
|
|
6
6
|
// modules/access_tokens_guard/access_token.ts
|
|
7
|
-
import { createHash } from "
|
|
7
|
+
import { createHash } from "crypto";
|
|
8
8
|
import string from "@adonisjs/core/helpers/string";
|
|
9
9
|
import { RuntimeException } from "@adonisjs/core/exceptions";
|
|
10
10
|
import { Secret, base64, safeEqual } from "@adonisjs/core/helpers";
|
|
@@ -562,8 +562,8 @@ var AccessTokensGuard = class {
|
|
|
562
562
|
*/
|
|
563
563
|
#getBearerToken() {
|
|
564
564
|
const bearerToken = this.#ctx.request.header("authorization", "");
|
|
565
|
-
const [, token] = bearerToken.split("
|
|
566
|
-
if (!token) {
|
|
565
|
+
const [type, token] = bearerToken.split(" ");
|
|
566
|
+
if (!type || type.toLowerCase() !== "bearer" || !token) {
|
|
567
567
|
throw this.#authenticationFailed();
|
|
568
568
|
}
|
|
569
569
|
return token;
|
|
@@ -657,7 +657,7 @@ var AccessTokensGuard = class {
|
|
|
657
657
|
};
|
|
658
658
|
|
|
659
659
|
// modules/access_tokens_guard/token_providers/db.ts
|
|
660
|
-
import { inspect } from "
|
|
660
|
+
import { inspect } from "util";
|
|
661
661
|
import { RuntimeException as RuntimeException2 } from "@adonisjs/core/exceptions";
|
|
662
662
|
var DbAccessTokensProvider = class _DbAccessTokensProvider {
|
|
663
663
|
constructor(options) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import "../../chunk-UXA4FHST.js";
|
|
5
5
|
|
|
6
6
|
// modules/session_guard/remember_me_token.ts
|
|
7
|
-
import { createHash } from "
|
|
7
|
+
import { createHash } from "crypto";
|
|
8
8
|
import string from "@adonisjs/core/helpers/string";
|
|
9
9
|
import { Secret, base64, safeEqual } from "@adonisjs/core/helpers";
|
|
10
10
|
var RememberMeToken = class {
|
|
@@ -458,7 +458,7 @@ var SessionGuard = class {
|
|
|
458
458
|
};
|
|
459
459
|
|
|
460
460
|
// modules/session_guard/token_providers/db.ts
|
|
461
|
-
import { inspect } from "
|
|
461
|
+
import { inspect } from "util";
|
|
462
462
|
import { RuntimeException as RuntimeException2 } from "@adonisjs/core/exceptions";
|
|
463
463
|
var DbRememberMeTokensProvider = class _DbRememberMeTokensProvider {
|
|
464
464
|
constructor(options) {
|
package/build/src/errors.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare const E_UNAUTHORIZED_ACCESS: {
|
|
|
59
59
|
help?: string;
|
|
60
60
|
message?: string;
|
|
61
61
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
62
|
-
prepareStackTrace
|
|
62
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
63
63
|
stackTraceLimit: number;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
@@ -99,6 +99,6 @@ export declare const E_INVALID_CREDENTIALS: {
|
|
|
99
99
|
help?: string;
|
|
100
100
|
message?: string;
|
|
101
101
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
102
|
-
prepareStackTrace
|
|
102
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
103
103
|
stackTraceLimit: number;
|
|
104
104
|
};
|