mirror of
https://github.com/bitwarden/server.git
synced 2025-06-07 19:50:32 -05:00
PM-20532 - CurrentContext.cs - move clientId up
This commit is contained in:
parent
553169724b
commit
a58194c74c
@ -134,6 +134,8 @@ public class CurrentContext : ICurrentContext
|
|||||||
|
|
||||||
var claimsDict = user.Claims.GroupBy(c => c.Type).ToDictionary(c => c.Key, c => c.Select(v => v));
|
var claimsDict = user.Claims.GroupBy(c => c.Type).ToDictionary(c => c.Key, c => c.Select(v => v));
|
||||||
|
|
||||||
|
ClientId = GetClaimValue(claimsDict, "client_id");
|
||||||
|
|
||||||
var clientType = GetClaimValue(claimsDict, Claims.Type);
|
var clientType = GetClaimValue(claimsDict, Claims.Type);
|
||||||
if (clientType != null)
|
if (clientType != null)
|
||||||
{
|
{
|
||||||
@ -160,7 +162,6 @@ public class CurrentContext : ICurrentContext
|
|||||||
UserId = subIdGuid;
|
UserId = subIdGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientId = GetClaimValue(claimsDict, "client_id");
|
|
||||||
var clientSubject = GetClaimValue(claimsDict, "client_sub");
|
var clientSubject = GetClaimValue(claimsDict, "client_sub");
|
||||||
var orgApi = false;
|
var orgApi = false;
|
||||||
if (clientSubject != null)
|
if (clientSubject != null)
|
||||||
@ -182,8 +183,6 @@ public class CurrentContext : ICurrentContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DeviceIdentifier = GetClaimValue(claimsDict, Claims.Device);
|
DeviceIdentifier = GetClaimValue(claimsDict, Claims.Device);
|
||||||
|
|
||||||
if (Enum.TryParse(GetClaimValue(claimsDict, Claims.DeviceType), out DeviceType deviceType))
|
if (Enum.TryParse(GetClaimValue(claimsDict, Claims.DeviceType), out DeviceType deviceType))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user