using System.Threading;
using System.Threading.Tasks;
using xIdentityModels.Models;
using System.Collections.Generic;
namespace xIdentityService.Interfaces
{
///
/// Implemented on xIds over IdentityServer4 ConfigurationDbContext ...
///
public interface IXScopeSyncService
{
Task UpsertAsync(
XScopeDefinition scope,
CancellationToken cancellationToken = default
);
Task RemoveAsync(
string scopeName,
CancellationToken cancellationToken = default
);
Task IsApiResourceExistsAsync(
string apiResourceName,
CancellationToken cancellationToken = default
);
}
///
/// Implemented on xIds over RoleManager<IdentityRole> ...
///
public interface IXRoleSyncService
{
Task UpsertAsync(
XRoleDefinition role,
CancellationToken cancellationToken = default
);
Task RemoveAsync(
string roleName,
CancellationToken cancellationToken = default
);
Task CountUsersInRoleAsync(
string roleName,
CancellationToken cancellationToken = default
);
Task> GetUserRolesAsync(
string userSelectByParam,
CancellationToken cancellationToken = default
);
}
}