Class IdentityUser
Represents a user in the identity system.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
[Stream("User")]
public class IdentityUser : IdentityUser<Guid>, IValidUser, ILocalUser, IUser, IUserIdentifiers, IUniqueIdentifier, IHaveEmail, IEventAggregate, IHaveClaims, IEventSourced
Constructors
IdentityUser()
Properties
Claims
Navigation property for the claims this user possesses.
Declaration
public virtual ICollection<IdentityUserClaim<Guid>> Claims { get; set; }
Property Value
System.Collections.Generic.ICollection<Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>>
|
IsSystemUser
Gets or sets if the user is a system or not.
Declaration
public bool IsSystemUser { get; set; }
Property Value
Boolean
true if the user is a system; false if the user is human. |
Implements
LastSignedIn
Gets or sets the date and time, in UTC, when the user last signed in.
Declaration
public DateTime? LastSignedIn { get; set; }
Property Value
System.Nullable<System.DateTime>
|
Implements
Remarks
A missing value means the user has not signed in yet.
PasswordLastChanged
Gets or sets the date and time, in UTC, when the user last changed password.
Declaration
public DateTimeOffset? PasswordLastChanged { get; set; }
Property Value
System.Nullable<System.DateTimeOffset>
|
Implements
Remarks
A missing value means the user has not any password set yet or that the user must change password next time when signing in.
PasswordNeverExpires
Gets or sets if the password never expires and therefor are never forced to be changed.
Declaration
public bool PasswordNeverExpires { get; set; }
Property Value
Boolean
|
Implements
ValidFrom
Gets or sets the System.DateTime, in UTC, from which the user is valid to sign-in.
Declaration
public DateTime ValidFrom { get; set; }
Property Value
System.DateTime
|
Implements
ValidTo
Gets or sets the System.DateTime, in UTC, on which the user is valid to sign-in.
Declaration
public DateTime? ValidTo { get; set; }
Property Value
System.Nullable<System.DateTime>
|
Implements
Methods
GetClaims(String)
Gets a collection of claims for this user.
Declaration
public virtual IEnumerable<Claim> GetClaims(string userNameClaimType = "preferred_username")
Parameters
String
userNameClaimType
|
Returns
IEnumerable<System.Security.Claims.Claim>
A collection of claims. |
Implements
IsValid()
Gets if the user is valid to sign-in.
Declaration
public bool IsValid()
Returns
Boolean
true if the user is valid to sign-in; otherwise false. |
Implements
RaiseEvent(IEvent)
Adds an event to the aggregate. The added event will be handled if an IEventSourceRepository is configured.
Declaration
public virtual void RaiseEvent(IEvent event)
Parameters
IEvent
event
The IEvent to add to the aggregate. |
Implements
Explicit Interface Implementations
IHaveClaims.GetClaims()
Declaration
IEnumerable<Claim> IHaveClaims.GetClaims()
Returns
IEnumerable<System.Security.Claims.Claim>
|
Implements
IEventSourced.ClearUncommittedEvents()
Declaration
void IEventSourced.ClearUncommittedEvents()
Implements
IEventSourced.GetUncommittedEvents()
Declaration
IEnumerable<IEvent> IEventSourced.GetUncommittedEvents()
Returns
IEnumerable<IEvent>
|
Implements
IEventSourced.LoadFromEvents(IEnumerable<IEvent>)
Declaration
void IEventSourced.LoadFromEvents(IEnumerable<IEvent> events)
Parameters
IEnumerable<IEvent>
events
|
Implements
IEventSourced.Version
Declaration
int IEventSourced.Version { get; set; }
Returns
System.Int32
|