check_password(v, user = @user)
private
Show source
def check_password(v, user = @user)
if @registry || @opaque
raise InvalidURIError,
"can not set password with registry or opaque"
end
return v unless v
if !user
raise InvalidURIError,
"password component depends user component"
end
if parser.regexp[:USERINFO] !~ v
raise InvalidComponentError,
"bad component(expected user component): #{v}"
end
return true
end