|
NAMEOpenXPKI::Server::API2::Plugin::Crypto::password_quality::ValidateDESCRIPTIONWorker class that performs the password checks defined in several Moose roles:
For more information about the checks see OpenXPKI::Server::API2::Plugin::Crypto::password_quality. ATTRIBUTESlogSomething that provides these methods: "trace", "debug", "info", "warn", "error", "fatal".Default: no logging checksChecks to be performed.Default: see the roles that implement checks passwordThe password to be tested.METHODSis_validReturns 1 if the given password passes all enabled checks, 0 otherwise.Parameters:
first_error_messagesReturns the error messages of the checks with the lowest complexity or "undef" if password is valid.I.e. for a password failing "letters", "digits" and "entropy" checks the result are the "letters" nad "digits" error messages. error_messagesReturns a list of error messages from all checks.error_codesReturn a list of error codes from all checks. The error codes match the options (e.g. "mixed", "sequence").METHODS FOR ROLESThe following methods are meant to be used by roles implementing password checks.hook_register_checksHook for roles to register their available checks and set default checks.Example usage: after hook_register_checks => sub { my $self = shift; $self->register_check( 'partsequence' => 'check_partsequence', 'partdict' => 'check_partdict', ); $self->add_default_check(qw( partsequence partdict )); }; register_checkRegister check names and their corresponding method names.Example usage: see "hook_register_checks". add_default_checkEnable the given list of checks by default (unless overridden by constructor parameter "checks").Example usage: see "hook_register_checks". hook_enable_checksHook for roles to enable checks based on specific conditions.Example usage: after hook_enable_checks => sub { my $self = shift; $self->enable('partdict') and $self->disable('dict') if $self->has_min_dict_len; }; enableEnable the given list of checks.disableDisable the given list of checks.add_errorAdds the given error to the list of errors.Parameters:
Visit the GSP FreeBSD Man Page Interface. |