Module: Vonage::Authentication
- Included in:
- Client
- Defined in:
- lib/vonage/authentication.rb
Instance Method Summary collapse
Instance Method Details
#authenticate ⇒ Object
4 5 6 7 8 9 |
# File 'lib/vonage/authentication.rb', line 4 def authenticate params = {login: @login, password: @password} get_response = get "/appserver/rest/user/null", params @cookies = (get_response) end |
#authenticated? ⇒ Boolean
11 12 13 |
# File 'lib/vonage/authentication.rb', line 11 def authenticated? !@cookies.empty? end |
#reauthenticate ⇒ Object
15 16 17 18 |
# File 'lib/vonage/authentication.rb', line 15 def reauthenticate @cookies = CookieHash.new authenticate end |