Skip to content

Commit

Permalink
feat: Add GetLdapUsersAccountAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Jul 22, 2024
1 parent c5620d3 commit 39d9277
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class GetLdapUsersAccountModel
{
public List<Guid> UserIds { get; set; } = new();
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,7 @@ public interface IUserService
Task<GetImpersonateOutputModel> GetImpersonateAsync(GetImpersonateInputModel model);

Task<ImpersonateOutputModel> ImpersonateAsync(ImpersonateInputModel model);

Task<Dictionary<Guid, string>> GetLdapUsersAccountAsync<T>(IEnumerable<Guid> userIds);
}

Original file line number Diff line number Diff line change
Expand Up @@ -411,5 +411,11 @@ public async Task<ImpersonateOutputModel> ImpersonateAsync(ImpersonateInputModel
var requestUri = $"api/user/impersonate";
return await _caller.PostAsync<object, ImpersonateOutputModel>(requestUri, model) ?? new();
}

public async Task<Dictionary<Guid, string>> GetLdapUsersAccountAsync<T>(IEnumerable<Guid> userIds)
{
var requestUri = $"api/thirdPartyUser/ldapUsersAccount";
return await _caller.PostAsync<Dictionary<Guid, string>>(requestUri, new GetLdapUsersAccountModel { UserIds = userIds.ToList()}) ?? new();
}
}

0 comments on commit 39d9277

Please sign in to comment.