//-----------------------------------------------------------------------
//
// Copyright (c) Outercurve Foundation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth.ChannelElements {
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Validation;
///
/// Represents an OAuth consumer that is impersonating a known user on the system.
///
[SuppressMessage("Microsoft.Interoperability", "CA1409:ComVisibleTypesShouldBeCreatable", Justification = "Not cocreatable.")]
[Serializable]
[ComVisible(true)]
internal class OAuth1Principal : OAuthPrincipal {
///
/// Initializes a new instance of the class.
///
/// The access token.
internal OAuth1Principal(IServiceProviderAccessToken token)
: base(token.Username, token.Roles) {
Requires.NotNull(token, "token");
this.AccessToken = token.Token;
}
}
}