/// <summary> /// Initializes a new instance of <see cref="RoleRule"/> /// </summary> /// <param name="userToAuthorize">The <see cref="UserSecurityActor" /> to check the role against.</param> /// <param name="role">The role to check for</param> public RoleRule(IUserSecurityActor userToAuthorize, string role) { _userToAuthorize = userToAuthorize; Role = role; }
/// <summary> /// Initializes a new instance of <see cref="RoleRule"/> /// </summary> /// <param name="userToAuthorize">The <see cref="UserSecurityActor" /> to check the role against.</param> /// <param name="claimType">The claim type to check for</param> /// <param name="value">The value of the claim to check for</param> public ClaimTypeAndValueRule(IUserSecurityActor userToAuthorize, string claimType, string value) { _userToAuthorize = userToAuthorize; ClaimType = claimType; Value = value; }
/// <summary> /// Initializes a new instance of the <see cref="ClaimTypeRule"/> class. /// </summary> /// <param name="userToAuthorize">The <see cref="UserSecurityActor" /> to check the role against.</param> /// <param name="claimType">The claim type to check for.</param> public ClaimTypeRule(IUserSecurityActor userToAuthorize, string claimType) { _userToAuthorize = userToAuthorize; ClaimType = claimType; }