blob: f47bac1f16e4afd065e02960f5811ff8488cb49f (
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
44
45
46
47
48
49
50
51
52
53
54
|
//-----------------------------------------------------------------------
// <copyright file="IAuthorizationCarryingRequest.cs" company="Outercurve Foundation">
// Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth2.ChannelElements {
using System.Security.Cryptography;
using Messaging;
/// <summary>
/// The various types of tokens created by the authorization server.
/// </summary>
internal enum CodeOrTokenType {
/// <summary>
/// The code issued to the client after the user has approved authorization.
/// </summary>
AuthorizationCode,
/// <summary>
/// The long-lived token issued to the client that enables it to obtain
/// short-lived access tokens later.
/// </summary>
RefreshToken,
/// <summary>
/// A (typically) short-lived token.
/// </summary>
AccessToken,
}
/// <summary>
/// A message that carries some kind of token from the client to the authorization or resource server.
/// </summary>
internal interface IAuthorizationCarryingRequest : IDirectedProtocolMessage {
/// <summary>
/// Gets or sets the verification code or refresh/access token.
/// </summary>
/// <value>The code or token.</value>
string CodeOrToken { get; set; }
/// <summary>
/// Gets the type of the code or token.
/// </summary>
/// <value>The type of the code or token.</value>
CodeOrTokenType CodeOrTokenType { get; }
/// <summary>
/// Gets or sets the authorization that the token describes.
/// </summary>
IAuthorizationDescription AuthorizationDescription { get; set; }
}
}
|