Module: Epitech::Api::CheckApi
- Included in:
- Connection
- Defined in:
- lib/api/check_api.rb
Instance Method Summary collapse
-
#check_auth ⇒ Boolean
Check for a good login/password combination (those given to Epitech::Api::Connection.new).
-
#check_password(login, pwd) ⇒ Boolean
Test if the parameters are an existing login / PPP combination.
-
#is_login?(login) ⇒ Boolean
Test if the parameter is an existing ionis login.
Instance Method Details
#check_auth ⇒ Boolean
Check for a good login/password combination (those given to Epitech::Api::Connection.new)
4 5 6 7 |
# File 'lib/api/check_api.rb', line 4 def check_auth call_api(action: 'login') true end |
#check_password(login, pwd) ⇒ Boolean
Test if the parameters are an existing login / PPP combination
21 22 23 24 25 |
# File 'lib/api/check_api.rb', line 21 def check_password(login, pwd) json = call_api(action: 'check_password', login: login, password: pwd) return false if json['state'] != 'OK' true end |
#is_login?(login) ⇒ Boolean
Test if the parameter is an existing ionis login
11 12 13 14 15 |
# File 'lib/api/check_api.rb', line 11 def is_login?(login) json = call_api(action: 'is_login', login: login) return false if json['state'] != 'OK' true end |