blob: 7763addbc93d15b20398915d64e15aaaf330c29b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
//-----------------------------------------------------------------------
// <copyright file="IOAuthWebWorker.cs" company="Microsoft">
// Copyright (c) Microsoft. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.AspNet.Clients {
using System;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OAuth.Messages;
/// <summary>
/// The interface implemented by all OAuth web authentication modules in this assembly.
/// </summary>
public interface IOAuthWebWorker {
/// <summary>
/// Creates an HTTP message handler that authorizes outgoing web requests.
/// </summary>
/// <param name="accessToken">The access token.</param>
HttpMessageHandler CreateMessageHandler(string accessToken);
/// <summary>
/// The process user authorization.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The response message.
/// </returns>
Task<AuthorizedTokenResponse> ProcessUserAuthorizationAsync(CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The request authentication.
/// </summary>
/// <param name="callback">The callback.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The response message</returns>
Task<HttpResponseMessage> RequestAuthenticationAsync(Uri callback, CancellationToken cancellationToken = default(CancellationToken));
}
}
|