Sha256: e98d0284412aed957c13f311f1fef1861ec9e7d20c16dcbdd84ab8ba408a26bc
Contents?: true
Size: 684 Bytes
Versions: 20
Compression:
Stored size: 684 Bytes
Contents
require "vmc/cli/v2_check_cli" module VMC module User class Base < V2CheckCLI def precondition check_logged_in end private def validate_password!(password) validate_password_verified!(password) validate_password_strength!(password) end def validate_password_verified!(password) fail "Passwords do not match." unless force? || password == input[:verify] end def validate_password_strength!(password) strength = client.base.password_score(password) msg = "Your password strength is: #{strength}" fail msg if strength == :weak line msg end end end end
Version data entries
20 entries across 20 versions & 2 rubygems