1 files changed, 8 insertions, 0 deletions
diff --git a/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs b/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs
index 05d0af9..4d81b52 100644
--- a/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs
+++ b/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs
@@ -12,6 +12,14 @@ public class SafeNSoundClient(SafeNSoundConfiguration config, string accessToken
Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", accessToken)
}
};
+
+ public async Task<WhoAmI> WhoAmI()
+ {
+ var res = await HttpClient.GetAsync("/auth/whoami");
+ res.EnsureSuccessStatusCode();
+ return (await res.Content.ReadFromJsonAsync<WhoAmI>())!;
+ }
+
#region Alarm
public async Task<AlarmDto> GetAlarm(string userId = "@me") {
|