Sha256: 35c056029e4b0705f6170657464541108e7af8bea37ef8cb62e17578009ade0b

Contents?: true

Size: 487 Bytes

Versions: 12

Compression:

Stored size: 487 Bytes

Contents

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
roqua-core-api-0.7.0 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.6.0 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.5.0 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.4.0 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.3.1 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.3.0 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.2.4 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.2.3 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.2.2 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.2.1 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.2.0 lib/roqua/core_api/create_token_session.rb
roqua-core-api-0.1.1 lib/roqua/core_api/create_token_session.rb