mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
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.
29 lines
1.0 KiB
29 lines
1.0 KiB
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.DependencyInjection;
|
|
using Volo.Abp.Users;
|
|
|
|
namespace Volo.Abp.Identity
|
|
{
|
|
[Dependency(TryRegister = true)]
|
|
public class HttpClientExternalUserLookupServiceProvider : IExternalUserLookupServiceProvider, ITransientDependency
|
|
{
|
|
protected IIdentityUserLookupAppService UserLookupAppService { get; }
|
|
|
|
public HttpClientExternalUserLookupServiceProvider(IIdentityUserLookupAppService userLookupAppService)
|
|
{
|
|
UserLookupAppService = userLookupAppService;
|
|
}
|
|
|
|
public virtual async Task<IUserData> FindByIdAsync(Guid id, CancellationToken cancellationToken = default)
|
|
{
|
|
return await UserLookupAppService.FindByIdAsync(id);
|
|
}
|
|
|
|
public virtual async Task<IUserData> FindByUserNameAsync(string userName, CancellationToken cancellationToken = default)
|
|
{
|
|
return await UserLookupAppService.FindByUserNameAsync(userName);
|
|
}
|
|
}
|
|
}
|
|
|