//-----------------------------------------------------------------------
//
// Copyright (c) Microsoft. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.AspNet {
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
///
/// Represents a client which can authenticate users via an external website/provider.
///
public interface IAuthenticationClient {
///
/// Gets the name of the provider which provides authentication service.
///
string ProviderName { get; }
///
/// Attempts to authenticate users by forwarding them to an external website, and upon succcess or failure, redirect users back to the specified url.
///
///
/// The context of the current request.
///
///
/// The return url after users have completed authenticating against external website.
///
Task RequestAuthenticationAsync(HttpContextBase context, Uri returnUrl, CancellationToken cancellationToken = default(CancellationToken));
///
/// Check if authentication succeeded after user is redirected back from the service provider.
///
///
/// The context of the current request.
///
///
/// An instance of containing authentication result.
///
Task VerifyAuthenticationAsync(HttpContextBase context, CancellationToken cancellationToken = default(CancellationToken));
}
}