module Roqua module CoreApi # @api private class CreateTokenSession < Base string :organization_id string :username string :password 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 end end end