Class: Roqua::CoreApi::CreateTokenSession Private

Inherits:
Base
  • Object
show all
Defined in:
lib/roqua/core_api/create_token_session.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#executeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
16
17
# File 'lib/roqua/core_api/create_token_session.rb', line 9

def execute
  response = CoreApi.basic_auth_session.post \
    "/organizations/#{organization_id}/token_sessions",
    username: username, password: password
  if response.code == 422
    errors_to_usecase response
  end
  response['token_session']
end