@logto/js 6.1.0 → 6.1.2
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/lib/consts/openid.d.ts +8 -1
- package/lib/consts/openid.js +9 -0
- package/package.json +3 -3
package/lib/consts/openid.d.ts
CHANGED
|
@@ -73,7 +73,14 @@ export declare enum UserScope {
|
|
|
73
73
|
*
|
|
74
74
|
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
|
75
75
|
*/
|
|
76
|
-
OrganizationRoles = "urn:logto:scope:organization_roles"
|
|
76
|
+
OrganizationRoles = "urn:logto:scope:organization_roles",
|
|
77
|
+
/**
|
|
78
|
+
* Scope for user's sessions.
|
|
79
|
+
*
|
|
80
|
+
* Only used for session management via account API.
|
|
81
|
+
* Not included in user claims, even when the scope is requested, as it's not meant for ID token or userinfo endpoint.
|
|
82
|
+
*/
|
|
83
|
+
Sessions = "urn:logto:scope:sessions"
|
|
77
84
|
}
|
|
78
85
|
/**
|
|
79
86
|
* Mapped claims that ID Token includes.
|
package/lib/consts/openid.js
CHANGED
|
@@ -76,6 +76,13 @@ var UserScope;
|
|
|
76
76
|
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
|
77
77
|
*/
|
|
78
78
|
UserScope["OrganizationRoles"] = "urn:logto:scope:organization_roles";
|
|
79
|
+
/**
|
|
80
|
+
* Scope for user's sessions.
|
|
81
|
+
*
|
|
82
|
+
* Only used for session management via account API.
|
|
83
|
+
* Not included in user claims, even when the scope is requested, as it's not meant for ID token or userinfo endpoint.
|
|
84
|
+
*/
|
|
85
|
+
UserScope["Sessions"] = "urn:logto:scope:sessions";
|
|
79
86
|
})(UserScope || (UserScope = {}));
|
|
80
87
|
/**
|
|
81
88
|
* Mapped claims that ID Token includes.
|
|
@@ -90,6 +97,7 @@ const idTokenClaims = Object.freeze({
|
|
|
90
97
|
[UserScope.OrganizationRoles]: ['organization_roles'],
|
|
91
98
|
[UserScope.CustomData]: [],
|
|
92
99
|
[UserScope.Identities]: [],
|
|
100
|
+
[UserScope.Sessions]: [],
|
|
93
101
|
});
|
|
94
102
|
/**
|
|
95
103
|
* Additional claims that Userinfo Endpoint returns.
|
|
@@ -104,6 +112,7 @@ const userinfoClaims = Object.freeze({
|
|
|
104
112
|
[UserScope.OrganizationRoles]: [],
|
|
105
113
|
[UserScope.CustomData]: ['custom_data'],
|
|
106
114
|
[UserScope.Identities]: ['identities'],
|
|
115
|
+
[UserScope.Sessions]: [],
|
|
107
116
|
});
|
|
108
117
|
const userClaims = Object.freeze(
|
|
109
118
|
// Hard to infer type directly, use `as` for a workaround.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/js",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "packages/js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@silverhand/essentials": "^2.9.
|
|
23
|
+
"@silverhand/essentials": "^2.9.3",
|
|
24
24
|
"camelcase-keys": "^9.1.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/node": "^22.0.0",
|
|
30
30
|
"@vitest/coverage-v8": "^2.1.9",
|
|
31
31
|
"eslint": "^8.57.0",
|
|
32
|
-
"happy-dom": "^
|
|
32
|
+
"happy-dom": "^20.0.8",
|
|
33
33
|
"jose": "^5.2.2",
|
|
34
34
|
"lint-staged": "^15.0.0",
|
|
35
35
|
"prettier": "^3.0.0",
|