@jskit-ai/auth-core 0.1.132 → 0.1.133
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/package.descriptor.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Object.freeze({
|
|
2
2
|
"packageVersion": 1,
|
|
3
3
|
"packageId": "@jskit-ai/auth-core",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.133",
|
|
5
5
|
"kind": "runtime",
|
|
6
6
|
"dependsOn": [
|
|
7
7
|
"@jskit-ai/value-app-config-shared"
|
|
@@ -74,7 +74,7 @@ export default Object.freeze({
|
|
|
74
74
|
"mutations": {
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"runtime": {
|
|
77
|
-
"@jskit-ai/kernel": "0.1.
|
|
77
|
+
"@jskit-ai/kernel": "0.1.135",
|
|
78
78
|
"@fastify/cookie": "^11.0.2",
|
|
79
79
|
"@fastify/csrf-protection": "^7.1.0",
|
|
80
80
|
"@fastify/rate-limit": "^10.3.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/auth-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.133",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"./shared/commands/authSessionReadCommand": "./src/shared/commands/authSessionReadCommand.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@jskit-ai/kernel": "0.1.
|
|
59
|
+
"@jskit-ai/kernel": "0.1.135",
|
|
60
60
|
"@fastify/cookie": "^11.0.2",
|
|
61
61
|
"@fastify/csrf-protection": "^7.1.0",
|
|
62
62
|
"@fastify/rate-limit": "^10.3.0",
|
|
@@ -16,13 +16,9 @@ const AUTH_DEV_LOGIN_AS_MESSAGES = createCommandMessages({
|
|
|
16
16
|
email: {
|
|
17
17
|
pattern: "Enter a valid email address.",
|
|
18
18
|
default: "Enter a valid email address."
|
|
19
|
-
},
|
|
20
|
-
login: {
|
|
21
|
-
pattern: "Provide a valid login name.",
|
|
22
|
-
default: "Provide a valid login name."
|
|
23
19
|
}
|
|
24
20
|
},
|
|
25
|
-
defaultMessage: "Provide a valid user id
|
|
21
|
+
defaultMessage: "Provide a valid user id or email."
|
|
26
22
|
});
|
|
27
23
|
|
|
28
24
|
const authDevLoginAsBodyValidator = deepFreeze({
|
|
@@ -34,12 +30,6 @@ const authDevLoginAsBodyValidator = deepFreeze({
|
|
|
34
30
|
email: {
|
|
35
31
|
...authEmailValidator,
|
|
36
32
|
required: false
|
|
37
|
-
},
|
|
38
|
-
login: {
|
|
39
|
-
type: "string",
|
|
40
|
-
required: false,
|
|
41
|
-
minLength: 1,
|
|
42
|
-
maxLength: 120
|
|
43
33
|
}
|
|
44
34
|
}),
|
|
45
35
|
mode: "patch",
|
|
@@ -47,7 +37,7 @@ const authDevLoginAsBodyValidator = deepFreeze({
|
|
|
47
37
|
...AUTH_DEV_LOGIN_AS_MESSAGES,
|
|
48
38
|
keywords: {
|
|
49
39
|
...AUTH_DEV_LOGIN_AS_MESSAGES.keywords,
|
|
50
|
-
anyOf: "Provide a user id
|
|
40
|
+
anyOf: "Provide a user id or email."
|
|
51
41
|
}
|
|
52
42
|
}
|
|
53
43
|
});
|
|
@@ -13,7 +13,6 @@ import { authPasswordRecoveryCompleteCommand } from "../src/shared/commands/auth
|
|
|
13
13
|
import { authPasswordResetCommand } from "../src/shared/commands/authPasswordResetCommand.js";
|
|
14
14
|
import { authLogoutCommand } from "../src/shared/commands/authLogoutCommand.js";
|
|
15
15
|
import { authSessionReadCommand } from "../src/shared/commands/authSessionReadCommand.js";
|
|
16
|
-
import { authDevLoginAsCommand } from "../src/shared/commands/authDevLoginAsCommand.js";
|
|
17
16
|
|
|
18
17
|
test("auth commands expose canonical operation validator messages", () => {
|
|
19
18
|
const commands = {
|
|
@@ -78,15 +77,6 @@ test("auth command body validators lowercase email inputs", () => {
|
|
|
78
77
|
}
|
|
79
78
|
});
|
|
80
79
|
|
|
81
|
-
test("dev login-as accepts an application login selector", () => {
|
|
82
|
-
const result = authDevLoginAsCommand.operation.body.schema.patch({
|
|
83
|
-
login: "merc"
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
assert.equal(result.validatedObject.login, "merc");
|
|
87
|
-
assert.deepEqual(result.errors, {});
|
|
88
|
-
});
|
|
89
|
-
|
|
90
80
|
test("auth session and oauth start commands expose explicit nested response schemas", () => {
|
|
91
81
|
const sessionResponseSchema = resolveStructuredSchemaTransportSchema(
|
|
92
82
|
authSessionReadCommand.operation.response,
|