Interface IIdentityAccessor
Interface of an accessor to informations regarding the current (user) identity.
public interface IIdentityAccessor : IIdentity
- Inherited Members
- Extension Methods
Properties
Id
Current user id or 0 if anonymous.
int Id { get; }
Property Value
Principal
Current (authenticated) user principal or the default based on SysIdentity.
ClaimsPrincipal Principal { get; }
Property Value
Roles
Current roles or null if anonymous.
string[] Roles { get; }
Property Value
- string[]
Methods
HasRole(string)
Returns true if user is in role.
bool HasRole(string role)
Parameters
role
string