//----------------------------------------------------------------------- // // Copyright (c) Microsoft. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.AspNet.Clients { using System; using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using System.Web; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OAuth; using DotNetOpenAuth.OAuth.Messages; /// /// The interface implemented by all OAuth web authentication modules in this assembly. /// public interface IOAuthWebWorker { /// /// Creates an HTTP message handler that authorizes outgoing web requests. /// /// The access token. HttpMessageHandler CreateMessageHandler(AccessToken accessToken); /// /// The process user authorization. /// /// The cancellation token. /// /// The access token, if obtained; otherwise null. /// Task ProcessUserAuthorizationAsync(HttpContextBase context = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The request authentication. /// /// The callback. /// The cancellation token. /// The URL to redirect the user agent to. Task RequestAuthenticationAsync(Uri callback, CancellationToken cancellationToken = default(CancellationToken)); } }