Class User
Summary description for User.
Inheritance
Implements
Namespace: ImageVault.Common.Data
Assembly: ImageVault.Common.dll
Syntax
public class User : Object, IUser
Constructors
User()
Initializes a new instance of the User class.
Declaration
public User()
User(User)
Initializes a new instance of the User class.
Declaration
public User(User user)
Parameters
Type | Name | Description |
---|---|---|
User | user |
User(IEnumerable<Claim>)
Declaration
public User(IEnumerable<Claim> claims)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> | claims |
User(IPrincipal)
Initializes a new instance of the User class.
Declaration
public User(IPrincipal principal)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.IPrincipal | principal |
User(String)
Initializes a new instance of the User class.
Declaration
public User(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username |
User(String, IList<String>)
Initializes a new instance of the User class.
Declaration
public User(string username, IList<string> roles)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.Collections.Generic.IList<System.String> | roles |
Properties
Claims
Declaration
public IList<Claim> Claims { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.Security.Claims.Claim> |
EmailAddress
Get/Sets the EmailAddress of the User
Declaration
public string EmailAddress { get; set; }
Property Value
Type | Description |
---|---|
System.String |
GlobalRoles
The global roles of the user
Declaration
public GlobalRoles GlobalRoles { get; set; }
Property Value
Type | Description |
---|---|
GlobalRoles |
Identities
Gets the Identities of the User
Declaration
public IList<string> Identities { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | a System.Collections.Generic.IList<> containing the users username and all roles |
IsApproved
Returns true if the user is approved
Declaration
public bool IsApproved { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsAuthenticated
Gets the authenticated status of the user
Declaration
public bool IsAuthenticated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsHostManagement
Returns true if the user is the host management user
Declaration
public bool IsHostManagement { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
NameIdentifier
Gets the name identifier for the user
Declaration
public string NameIdentifier { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Principal
Get/Sets the Principal of the User
Declaration
public IPrincipal Principal { get; }
Property Value
Type | Description |
---|---|
System.Security.Principal.IPrincipal |
Roles
The roles of the user
Declaration
public IList<string> Roles { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> |
Username
Get/Sets the Username of the User
Declaration
public string Username { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
ToString()
Returns a System.String that represents the current User.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current User. |