Sha256: d777d1c2c7203e46c7c3f5cf531db2a7e459bd600497183c206a536221eb21c6
Contents?: true
Size: 829 Bytes
Versions: 24
Compression:
Stored size: 829 Bytes
Contents
# frozen_string_literal: true module ApiController # General barong API functions class Barong require 'json' require 'rest-client' def initialize(endpoint, app_id) @endpoint = endpoint @app_id = app_id end def log_in(email, password) response = RestClient.post("#{@endpoint}/sessions", { 'email': email, 'password': password, 'application_id': @app_id, 'expires_in': 80_000 }, { 'content_type': 'application/x-www-form-urlencoded' }) response.delete('"') end end end
Version data entries
24 entries across 24 versions & 1 rubygems