Sha256: 9b70a6ba4e8bda87dc71a9da05ee904973b23d0ce6c11f20b4d1faf0d1dd3716
Contents?: true
Size: 684 Bytes
Versions: 9
Compression:
Stored size: 684 Bytes
Contents
require "jdc/cli" module JDC module User class Base < CLI def precondition check_key #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
9 entries across 9 versions & 1 rubygems