@logto/js 0.1.16 → 0.1.17

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.
@@ -10,6 +10,10 @@ declare const IdTokenClaimsSchema: s.Struct<{
10
10
  exp: number;
11
11
  iat: number;
12
12
  at_hash?: string | undefined;
13
+ name?: string | undefined;
14
+ username?: string | undefined;
15
+ avatar?: string | undefined;
16
+ role_names?: string[] | undefined;
13
17
  }, {
14
18
  iss: s.Struct<string, null>;
15
19
  sub: s.Struct<string, null>;
@@ -17,6 +21,10 @@ declare const IdTokenClaimsSchema: s.Struct<{
17
21
  exp: s.Struct<number, null>;
18
22
  iat: s.Struct<number, null>;
19
23
  at_hash: s.Struct<string | undefined, null>;
24
+ name: s.Struct<string | undefined, null>;
25
+ username: s.Struct<string | undefined, null>;
26
+ avatar: s.Struct<string | undefined, null>;
27
+ role_names: s.Struct<string[] | undefined, s.Struct<string, null>>;
20
28
  }>;
21
29
  export declare type IdTokenClaims = s.Infer<typeof IdTokenClaimsSchema>;
22
30
  export declare const verifyIdToken: (idToken: string, clientId: string, issuer: string, jwks: JWTVerifyGetKey) => Promise<void>;
@@ -35,6 +35,10 @@ const IdTokenClaimsSchema = s.type({
35
35
  exp: s.number(),
36
36
  iat: s.number(),
37
37
  at_hash: s.optional(s.string()),
38
+ name: s.optional(s.string()),
39
+ username: s.optional(s.string()),
40
+ avatar: s.optional(s.string()),
41
+ role_names: s.optional(s.array(s.string())),
38
42
  });
39
43
  const verifyIdToken = async (idToken, clientId, issuer, jwks) => {
40
44
  const result = await (0, jose_1.jwtVerify)(idToken, jwks, { audience: clientId, issuer });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/js",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "main": "./lib/index.js",
5
5
  "exports": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "jose": "^4.3.8",
29
29
  "js-base64": "^3.7.2",
30
30
  "lodash.get": "^4.4.2",
31
- "superstruct": "^0.15.3"
31
+ "superstruct": "^0.16.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jest/types": "^27.5.1",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "b56e794cea7ba791c73cd2da6e4ea405223d6970"
60
+ "gitHead": "57e93385829eceb3c1b2ffb92b90901aa174a59a"
61
61
  }