Sha256: 6c637d1b595c681d326ceb515558a3ba5bc9ce6399d698b71654296c623ce1fa
Contents?: true
Size: 815 Bytes
Versions: 5
Compression:
Stored size: 815 Bytes
Contents
module Bushido # Bushido User enables user validation against Bushido's server class User class << self def unity_url #:nodoc: "#{Bushido::Platform.host}/connect/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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bushido-0.0.17 | lib/bushido/user.rb |
bushido-0.0.16 | lib/bushido/user.rb |
bushido-0.0.15 | lib/bushido/user.rb |
bushido-0.0.14 | lib/bushido/user.rb |
bushido-0.0.13 | lib/bushido/user.rb |