blob: 35ba52d8a300142479292f4402a2f1a5676e074f (
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
|
//-----------------------------------------------------------------------
// <copyright file="IServiceProviderAccessToken.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth.ChannelElements {
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
/// <summary>
/// A description of an access token and its metadata as required by a Service Provider.
/// </summary>
public interface IServiceProviderAccessToken {
/// <summary>
/// Gets the token itself.
/// </summary>
string Token { get; }
/// <summary>
/// Gets the expiration date (local time) for the access token.
/// </summary>
/// <value>The expiration date, or <c>null</c> if there is no expiration date.</value>
DateTime? ExpirationDate { get; }
/// <summary>
/// Gets the username of the principal that will be impersonated by this access token.
/// </summary>
/// <value>
/// The name of the user who authorized the OAuth request token originally.
/// </value>
[SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Username", Justification = "Breaking change.")]
string Username { get; }
/// <summary>
/// Gets the roles that the OAuth principal should belong to.
/// </summary>
/// <value>
/// The roles that the user belongs to, or a subset of these according to the rights
/// granted when the user authorized the request token.
/// </value>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "By design.")]
string[] Roles { get; }
}
}
|