Files
OwinOAuthProviders/Owin.Security.Providers/GitHub/Provider/IGitHubAuthenticationProvider.cs
2013-11-27 10:29:29 +07:00

24 lines
1.2 KiB
C#

using System.Threading.Tasks;
namespace Owin.Security.Providers.GitHub
{
/// <summary>
/// Specifies callback methods which the <see cref="GitHubAuthenticationMiddleware"></see> invokes to enable developer control over the authentication process. />
/// </summary>
public interface IGitHubAuthenticationProvider
{
/// <summary>
/// Invoked whenever GitHub succesfully authenticates a user
/// </summary>
/// <param name="context">Contains information about the login session as well as the user <see cref="System.Security.Claims.ClaimsIdentity"/>.</param>
/// <returns>A <see cref="Task"/> representing the completed operation.</returns>
Task Authenticated(GitHubAuthenticatedContext context);
/// <summary>
/// Invoked prior to the <see cref="System.Security.Claims.ClaimsIdentity"/> being saved in a local cookie and the browser being redirected to the originally requested URL.
/// </summary>
/// <param name="context"></param>
/// <returns>A <see cref="Task"/> representing the completed operation.</returns>
Task ReturnEndpoint(GitHubReturnEndpointContext context);
}
}