mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
PM-11123: Device Type mapping (#4768)
* PM-11123: Device Type mapping * PM-11123: Moving ClientType out of NotificationCenter, naming clash with Identity ClientType * PM-11123: Rename ClientType in ICurrentContext to match the type
This commit is contained in:
@ -128,7 +128,7 @@ public class ClientStore : IClientStore
|
||||
Claims = new List<ClientClaim>
|
||||
{
|
||||
new(JwtClaimTypes.Subject, apiKey.ServiceAccountId.ToString()),
|
||||
new(Claims.Type, ClientType.ServiceAccount.ToString()),
|
||||
new(Claims.Type, IdentityClientType.ServiceAccount.ToString()),
|
||||
},
|
||||
};
|
||||
|
||||
@ -160,7 +160,7 @@ public class ClientStore : IClientStore
|
||||
{
|
||||
new(JwtClaimTypes.Subject, user.Id.ToString()),
|
||||
new(JwtClaimTypes.AuthenticationMethod, "Application", "external"),
|
||||
new(Claims.Type, ClientType.User.ToString()),
|
||||
new(Claims.Type, IdentityClientType.User.ToString()),
|
||||
};
|
||||
var orgs = await _currentContext.OrganizationMembershipAsync(_organizationUserRepository, user.Id);
|
||||
var providers = await _currentContext.ProviderMembershipAsync(_providerUserRepository, user.Id);
|
||||
@ -218,7 +218,7 @@ public class ClientStore : IClientStore
|
||||
Claims = new List<ClientClaim>
|
||||
{
|
||||
new(JwtClaimTypes.Subject, org.Id.ToString()),
|
||||
new(Claims.Type, ClientType.Organization.ToString()),
|
||||
new(Claims.Type, IdentityClientType.Organization.ToString()),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user