Sha256: 2e3695bbe8d1386c32adc62eca92218f995a5faeaf4156af824aa5653c9b64f2
Contents?: true
Size: 813 Bytes
Versions: 13
Compression:
Stored size: 813 Bytes
Contents
module Bushido # Bushido User enables user validation against Bushido's server class User class << self def unity_url #:nodoc: "#{Bushido::Platform.host}/unity/v1" end # Checks whether user an email and password correspond to a valid bushido # user. Returns nil if false, or the Bushido user's ID if true. def valid?(email, pass) params = {} params[:email] = email params[:pass] = pass Bushido::Command.post_command("#{unity_url}/valid", params) end # Checks whether email corresponds to a valid Bushido user. # Returns true or false def exists?(email) params = {} params[:email] = email Bushido::Command.post_command("#{unity_url}/exists", params) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems