Skip to content

Commit

Permalink
fix: support redis cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierAtSIEN committed Mar 28, 2020
1 parent 1d9cb9b commit ec87558
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions src/Aguacongas.Identity.Redis/RoleStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public class RoleStore<TRole, TKey, TUserRole, TRoleClaim> :
where TUserRole : IdentityUserRole<TKey>, new()
where TRoleClaim : IdentityRoleClaim<TKey>, new()
{
private const string RolesRedisKey = "roles";
private const string RolesConcurencyStampIndexKey = "roles-concurency";
private const string RolesNameIndexKey = "role-names";
private const string RoleClaimsRedisKey = "role-claims";
private const string RoleClaimsKeyPrefix = "role-claims-";
private const string RolesRedisKey = "{roles}";
private const string RolesConcurencyStampIndexKey = "{roles}-concurency";
private const string RolesNameIndexKey = "{role}-names";
private const string RoleClaimsRedisKey = "{role}-claims";
private const string RoleClaimsKeyPrefix = "{role}-claims-";

private readonly IDatabase _db;
private bool _disposed;
Expand Down
18 changes: 9 additions & 9 deletions src/Aguacongas.Identity.Redis/UserOnlyStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ public class UserOnlyStore<TUser, TKey, TUserClaim, TUserLogin, TUserToken> :
where TUserLogin : IdentityUserLogin<TKey>, new()
where TUserToken : IdentityUserToken<TKey>, new()
{
private const string UsersRedisKey = "users";
private const string UsersConcurencyStampIndexKey = "users-concurency";
private const string UsersNameIndexKey = "users-name";
private const string UsersEmailIndexKey = "users-email";
private const string UserLoginsRedisKey = "user-logins";
private const string UserLoginProviderKeyPrefix = "login-provider-";
private const string UserClaimsRedisKey = "user-claims";
private const string UserClaimsKeyPrefix = "user-claim-";
private const string UserTokensRedisKey = "user-tokens";
private const string UsersRedisKey = "{users}";
private const string UsersConcurencyStampIndexKey = "{users}-concurency";
private const string UsersNameIndexKey = "{users}-name";
private const string UsersEmailIndexKey = "{users}-email";
private const string UserLoginsRedisKey = "{user}-logins";
private const string UserLoginProviderKeyPrefix = "{user}-login-provider-";
private const string UserClaimsRedisKey = "{user}-claims";
private const string UserClaimsKeyPrefix = "{user}-claim-";
private const string UserTokensRedisKey = "{user}-tokens";

private readonly IDatabase _db;

Expand Down
10 changes: 5 additions & 5 deletions src/Aguacongas.Identity.Redis/UserStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ public class UserStore<TUser, TKey, TRole, TUserClaim, TUserRole, TUserLogin, TU
where TUserToken : IdentityUserToken<TKey>, new()
where TRoleClaim : IdentityRoleClaim<TKey>, new()
{
private const string UserRolesRedisKey = "users-roles";
private const string UserRolesNameIndexKey = "users-rolenames";
private const string RolesRedisKey = "roles";
private const string RolesConcurencyStampIndexKey = "roles-concurency";
private const string RolesNameIndexKey = "role-names";
private const string UserRolesRedisKey = "{users}-roles";
private const string UserRolesNameIndexKey = "{users}-rolenames";
private const string RolesRedisKey = "{roles}";
private const string RolesConcurencyStampIndexKey = "{roles}-concurency";
private const string RolesNameIndexKey = "{role}-names";

private readonly IDatabase _db;
private readonly UserOnlyStore<TUser, TKey, TUserClaim, TUserLogin, TUserToken> _userOnlyStore;
Expand Down

0 comments on commit ec87558

Please sign in to comment.