Module: Kanoah::Services::Authentication
- Included in:
- Client
- Defined in:
- lib/services/authentication.rb
Instance Method Summary collapse
Instance Method Details
#login(username, password) ⇒ Object
5 6 7 8 9 |
# File 'lib/services/authentication.rb', line 5 def login(username, password) @response = self.class.post('/rest/auth/1/session', body: {'username' => username, 'password' => password}.to_json, headers: {"Content-Type" => "application/json"}) #set_access_token(@response['session']['name'] +'='+@response['session']['value']) self end |