Sha256: f354ba31d0ff93822e71388cb60065eff014ad71f486b18d2a2b65d75234e540
Contents?: true
Size: 664 Bytes
Versions: 12
Compression:
Stored size: 664 Bytes
Contents
require "vmc/cli" module VMC module User class Base < CLI 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
12 entries across 12 versions & 2 rubygems