Skip to content

Commit 4363d55

Browse files
Add impersonated user ID to the authentication info (#13)
1 parent 9729bab commit 4363d55

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "git",
66
"url": "https://github.com/PropelAuth/javascript"
77
},
8-
"version": "2.0.4",
8+
"version": "2.0.5",
99
"keywords": [
1010
"auth",
1111
"user",

src/api.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export type AuthenticationInfo = {
3737
*/
3838
orgIdToOrgMemberInfo?: OrgIdToOrgMemberInfo
3939
user: User
40+
41+
// If someone on your team is impersonating another user, this will be set to the employee's ID
42+
// By default, user impersonation is turned off and this will be undefined
43+
impersonatorUserId?: string
4044
}
4145

4246

@@ -161,6 +165,8 @@ export function parseJsonConvertingSnakeToCamel(str: string): AuthenticationInfo
161165
this.lastActiveAt = value
162166
} else if (key === "legacy_user_id") {
163167
this.legacyUserId = value
168+
} else if (key === "impersonator_user") {
169+
this.impersonatorUserId = value
164170
} else {
165171
return value
166172
}

0 commit comments

Comments
 (0)