@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.
|
@@ -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
|
|
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