You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
704 B
24 lines
704 B
using Application.Domain.Entities;
|
|
using IdentityServer4.Stores;
|
|
using Infrastructure.Data;
|
|
using Infrastructure.Extensions;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace UserCenter
|
|
{
|
|
public class ClientStore : IClientStore
|
|
{
|
|
private readonly IRepository<Client> _clientRepo;
|
|
|
|
public ClientStore(IRepository<Client> clientRepo)
|
|
{
|
|
this._clientRepo = clientRepo;
|
|
}
|
|
|
|
Task<IdentityServer4.Models.Client> IClientStore.FindClientByIdAsync(string clientId)
|
|
{
|
|
return Task.FromResult(this._clientRepo.ReadOnlyTable().FirstOrDefault(o => o.ClientId == clientId).To<IdentityServer4.Models.Client>());
|
|
}
|
|
}
|
|
} |