mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
Get rid of LdapTeam and LdapUser, the regular Team and User objects contain ldap_dn field if LDAP sync is enabled
56 lines
2.5 KiB
C#
56 lines
2.5 KiB
C#
using System.Threading.Tasks;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Enterprise LDAP API
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://developer.github.com/v3/enterprise/ldap/">Enterprise LDAP API documentation</a> for more information.
|
|
///</remarks>
|
|
public interface IEnterpriseLdapClient
|
|
{
|
|
/// <summary>
|
|
/// Update the LDAP mapping for a user on a GitHub Enterprise appliance (must be Site Admin user).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user
|
|
/// </remarks>
|
|
/// <param name="userName">The username to update LDAP mapping</param>
|
|
/// <param name="newLdapMapping">The <see cref="NewLdapMapping"/></param>
|
|
/// <returns>The <see cref="User"/> object.</returns>
|
|
Task<User> UpdateUserMapping(string userName, NewLdapMapping newLdapMapping);
|
|
|
|
/// <summary>
|
|
/// Queue an LDAP Sync job for a user on a GitHub Enterprise appliance (must be Site Admin user).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-user
|
|
/// </remarks>
|
|
/// <param name="userName">The username to sync LDAP mapping</param>
|
|
/// <returns>The <see cref="LdapSyncResponse"/> of the queue request.</returns>
|
|
Task<LdapSyncResponse> QueueSyncUserMapping(string userName);
|
|
|
|
/// <summary>
|
|
/// Update the LDAP mapping for a team on a GitHub Enterprise appliance (must be Site Admin user).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team
|
|
/// </remarks>
|
|
/// <param name="teamId">The teamId to update LDAP mapping</param>
|
|
/// <param name="newLdapMapping">The <see cref="NewLdapMapping"/></param>
|
|
/// <returns>The <see cref="Team"/> object.</returns>
|
|
Task<Team> UpdateTeamMapping(int teamId, NewLdapMapping newLdapMapping);
|
|
|
|
/// <summary>
|
|
/// Queue an LDAP Sync job for a team on a GitHub Enterprise appliance (must be Site Admin user).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-team
|
|
/// </remarks>
|
|
/// <param name="teamId">The teamId to update LDAP mapping</param>
|
|
/// <returns>The <see cref="LdapSyncResponse"/> of the queue request.</returns>
|
|
Task<LdapSyncResponse> QueueSyncTeamMapping(int teamId);
|
|
}
|
|
}
|