@chevre/domain 21.30.0-alpha.39 → 21.30.0-alpha.40

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.
@@ -59,14 +59,6 @@ const schemaOptions = {
59
59
  }
60
60
  };
61
61
  const indexes = [
62
- [
63
- { createdAt: 1 },
64
- { name: 'searchByCreatedAt' }
65
- ],
66
- [
67
- { updatedAt: 1 },
68
- { name: 'searchByUpdatedAt' }
69
- ],
70
62
  [
71
63
  // コードはユニークなはず
72
64
  { code: 1 },
@@ -15,6 +15,10 @@ type IPayloadWithNoVersion = factory.authorization.IObject & {
15
15
  * コードをトークンに変換する
16
16
  */
17
17
  declare function getToken(params: {
18
+ agent: {
19
+ id: string;
20
+ typeOf: factory.creativeWorkType.SoftwareApplication | factory.creativeWorkType.WebApplication | factory.personType.Person;
21
+ };
18
22
  project: {
19
23
  id: string;
20
24
  };
@@ -45,11 +45,16 @@ function getToken(params) {
45
45
  ticketToken: params.code
46
46
  });
47
47
  jti = id;
48
- // ロール承認の場合、subjectはクライアントID,typはメンバータイプ
48
+ // ロール承認の場合、subjectはメンバーID,typはメンバータイプ
49
49
  if (authorization.object.typeOf === factory.iam.RoleType.OrganizationRole) {
50
50
  subject = authorization.object.member.id;
51
51
  typ = `${credentials_1.credentials.jwt.payloadTypPrefix}:${authorization.object.member.typeOf}`;
52
52
  }
53
+ else {
54
+ // useJtiの場合、subject,typはagent(2024-05-09~)
55
+ subject = params.agent.id;
56
+ typ = `${credentials_1.credentials.jwt.payloadTypPrefix}:${params.agent.typeOf}`;
57
+ }
53
58
  }
54
59
  const isAuthorize4order = authorization.object.typeOf === factory.order.OrderType.Order;
55
60
  const payload = Object.assign(Object.assign({}, (settings_1.USE_TOKEN_WITH_NO_VERSION && isAuthorize4order) ? authorization.object : undefined), {
package/package.json CHANGED
@@ -110,5 +110,5 @@
110
110
  "postversion": "git push origin --tags",
111
111
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
112
112
  },
113
- "version": "21.30.0-alpha.39"
113
+ "version": "21.30.0-alpha.40"
114
114
  }