using System;
using System.Runtime.InteropServices;
namespace System.Security.Principal
{
/// Represents a generic user.
// Token: 0x020005A9 RID: 1449
[ComVisible(true)]
[Serializable]
public class GenericIdentity : IIdentity
{
/// Initializes a new instance of the class representing the user with the specified name and authentication type.
/// The name of the user on whose behalf the code is running.
/// The type of authentication used to identify the user.
/// The parameter is null.-or- The parameter is null.
// Token: 0x06003515 RID: 13589 RVA: 0x000B6DB0 File Offset: 0x000B4FB0
public GenericIdentity(string name, string type)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (type == null)
{
throw new ArgumentNullException("type");
}
this.m_name = name;
this.m_type = type;
}
/// Initializes a new instance of the class representing the user with the specified name.
/// The name of the user on whose behalf the code is running.
/// The parameter is null.
// Token: 0x06003516 RID: 13590 RVA: 0x000B6DF4 File Offset: 0x000B4FF4
public GenericIdentity(string name)
: this(name, string.Empty)
{
}
/// Gets the type of authentication used to identify the user.
/// The type of authentication used to identify the user.
// Token: 0x17000A66 RID: 2662
// (get) Token: 0x06003517 RID: 13591 RVA: 0x000B6E04 File Offset: 0x000B5004
public virtual string AuthenticationType
{
get
{
return this.m_type;
}
}
/// Gets the user's name.
/// The name of the user on whose behalf the code is being run.
// Token: 0x17000A67 RID: 2663
// (get) Token: 0x06003518 RID: 13592 RVA: 0x000B6E0C File Offset: 0x000B500C
public virtual string Name
{
get
{
return this.m_name;
}
}
/// Gets a value indicating whether the user has been authenticated.
/// true if the user was has been authenticated; otherwise, false.
// Token: 0x17000A68 RID: 2664
// (get) Token: 0x06003519 RID: 13593 RVA: 0x000B6E14 File Offset: 0x000B5014
public virtual bool IsAuthenticated
{
get
{
return this.m_name.Length > 0;
}
}
// Token: 0x0400158E RID: 5518
private string m_name;
// Token: 0x0400158F RID: 5519
private string m_type;
}
}