diff --git a/bundle/src/Comms/Event/ToCore/User/GetMeResponse.php b/bundle/src/Comms/Event/ToCore/User/GetMeResponse.php index 17ec631..be29421 100644 --- a/bundle/src/Comms/Event/ToCore/User/GetMeResponse.php +++ b/bundle/src/Comms/Event/ToCore/User/GetMeResponse.php @@ -10,6 +10,8 @@ public function __construct( private ?AuthUser $user = null, private ?AuthUserOrganization $organization = null, + // session ID from HYVOR (used for audits mostly) + private ?int $sessionId = null, ) {} public function getUser(): ?AuthUser @@ -22,4 +24,8 @@ public function getOrganization(): ?AuthUserOrganization return $this->organization; } + public function getSessionId(): ?int + { + return $this->sessionId; + } } diff --git a/src/Auth/Auth.php b/src/Auth/Auth.php index d318c7b..8ada5b0 100644 --- a/src/Auth/Auth.php +++ b/src/Auth/Auth.php @@ -47,7 +47,11 @@ public function me(Request $request): ?Me return null; } - return new Me($user, $response->getOrganization()); + return new Me( + $user, + $response->getOrganization(), + $response->getSessionId(), + ); } /**