Sha256: 26957e25e4029ebce54e49ef365cbeaf7c545453e4c1d8a7c4e61aed41d358af
Contents?: true
Size: 645 Bytes
Versions: 19
Compression:
Stored size: 645 Bytes
Contents
# typed: true # frozen_string_literal: true module Workato module Web class App CODE_PATH = '/code' CALLBACK_PATH = '/oauth/callback' def call(env) req = Rack::Request.new(env) case req.path_info when /#{CODE_PATH}/ [200, { 'Content-Type' => 'text/plain' }, [@code.to_s]] when /#{CALLBACK_PATH}/ @code = req.params['code'] [200, { 'Content-Type' => 'text/plain' }, ['We stored response code. Now you can close the browser window']] else [404, { 'Content-Type' => 'text/plain' }, ['404: Not Found']] end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems