Table of Contents

Class DelegatePasswordRule

Namespace
The.Security.Password
Assembly
Instagile.dll
public sealed class DelegatePasswordRule : IPasswordRule
Inheritance
DelegatePasswordRule
Implements
Inherited Members

Constructors

DelegatePasswordRule(Func<string, bool>, string, string)

public DelegatePasswordRule(Func<string, bool> validatePassword, string description, string instructions)

Parameters

validatePassword Func<string, bool>
description string
instructions string

DelegatePasswordRule(Func<string, IEnumerable<string>, bool>, string, string)

public DelegatePasswordRule(Func<string, IEnumerable<string>, bool> validatePassword, string description, string instructions)

Parameters

validatePassword Func<string, IEnumerable<string>, bool>
description string
instructions string

Properties

Description

A description of this password rule.

public string Description { get; }

Property Value

string

Instructions

A string that may be shown to the user when their password is deemed invalid by this rule.

public string Instructions { get; }

Property Value

string

Methods

IsValid(string, IEnumerable<string>?)

Validate the supplied password against this rule.

public bool IsValid(string password, IEnumerable<string>? userDataStrings = null)

Parameters

password string

The password to validate

userDataStrings IEnumerable<string>

Strings that the application knows about the user supplying the password that this rule may use as part of password validation.

Returns

bool

Whether the supplied password is valid under this rule.