Files
octokit.net/Octokit/Clients/Enterprise/IEnterpriseLdapClient.cs
Ryan Gribble e4eb1166b7 Due to api serialisation, must use LdapDn rather than LdapDN (the latter turns into ldap_d_n instead of ldap_dn)
Get rid of LdapTeam and LdapUser, the regular Team and User objects contain ldap_dn field if LDAP sync is enabled
2016-02-12 09:37:33 +10:00

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);
}
}