2015-12-08 22:57:38 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2016-05-19 19:10:24 -04:00
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
2015-12-08 22:57:38 -05:00
|
|
|
|
using Bit.Core.Domains;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Identity
|
|
|
|
|
|
{
|
|
|
|
|
|
public class RoleStore : IRoleStore<Role>
|
|
|
|
|
|
{
|
|
|
|
|
|
public void Dispose() { }
|
|
|
|
|
|
|
|
|
|
|
|
public Task<IdentityResult> CreateAsync(Role role, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<IdentityResult> DeleteAsync(Role role, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<Role> FindByIdAsync(string roleId, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<Role> FindByNameAsync(string normalizedRoleName, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetNormalizedRoleNameAsync(Role role, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult(role.Name);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetRoleIdAsync(Role role, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<string> GetRoleNameAsync(Role role, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult(role.Name);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task SetNormalizedRoleNameAsync(Role role, string normalizedName, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
2015-12-29 21:45:21 -05:00
|
|
|
|
return Task.FromResult(0);
|
2015-12-08 22:57:38 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task SetRoleNameAsync(Role role, string roleName, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
role.Name = roleName;
|
2015-12-29 21:45:21 -05:00
|
|
|
|
return Task.FromResult(0);
|
2015-12-08 22:57:38 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<IdentityResult> UpdateAsync(Role role, CancellationToken cancellationToken)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|