// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
namespace Microsoft.AspNet.Authentication.OAuth
{
///
/// Specifies callback methods which the invokes to enable developer control over the authentication process.
///
public interface IOAuthAuthenticationNotifications
{
///
/// Invoked after the provider successfully authenticates a user. This can be used to retrieve user information.
/// This notification may not be invoked by sub-classes of OAuthAuthenticationHandler if they override GetUserInformationAsync.
///
/// Contains information about the login session.
/// A representing the completed operation.
Task GetUserInformationAsync(OAuthGetUserInformationContext context);
///
/// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL.
///
///
/// A representing the completed operation.
Task ReturnEndpoint(OAuthReturnEndpointContext context);
///
/// Called when a Challenge causes a redirect to authorize endpoint in the Microsoft middleware.
///
/// Contains redirect URI and of the challenge.
void ApplyRedirect(OAuthApplyRedirectContext context);
}
}