gatleon-rails 0.1.1 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2808f3c5f7c91c27b3814dc48b445a942c47180b83f41eab0523aea5f9960076
4
- data.tar.gz: 11bf642b7edadbd200d4a8943d88b38e52e448902b58e6c83a2379be45718b3f
3
+ metadata.gz: e4b40655779a5b7f2e42532ea4cd4628c32a01af3d162d5f23d65468bb21be2b
4
+ data.tar.gz: 5f5369651e7187f520539525b29226243c9eb0d8251afd5e86f7720627443bda
5
5
  SHA512:
6
- metadata.gz: 1c575051e593a79b694b19bad48d81059229cc4b4c191116c43b209254f6c97ffbbd3fbb97e8f64be63bb766d8d526c7a203c60808964b5adb38e82c0250ed03
7
- data.tar.gz: 6bdcbcd283c32a9b344298436ebb2e14613abb33bccde4ddd376d0850abd9298b87b6670410059cb11c66d6c78bf97ff1b55003a6509cf95c02bd8ca88679adf
6
+ metadata.gz: 05aa8f1f5bc99ffb76f2c2684c63b76d3cb07285b8301b59c3d9d10e1b86ea80e35efac4164e151e5e1621d1f59b99733605559f382068aca784477237e0c985
7
+ data.tar.gz: 9ecc13a6cacec12cbf7f83d64f309c957a548e3f268ff02427614f4e4e938f61feef56bb6826b127785e7ffec509f8fd3d89fe02772c9b19ea60c009f9104217
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gatleon-rails (0.1.1)
4
+ gatleon-rails (0.1.6)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -1,4 +1,6 @@
1
+ require "faraday"
1
2
  require "gatleon/rails/version"
3
+ require "gatleon/rails/authform/concern"
2
4
 
3
5
  module Gatleon
4
6
  module Rails
@@ -2,7 +2,9 @@ module Gatleon
2
2
  module Rails
3
3
  module Authform
4
4
  class Concern < Module
5
- def initialize(form_uid:, current_user_method_name: "current_user")
5
+ def initialize(form_uid:,
6
+ current_user_method_name: "current_user",
7
+ root_url: "https://authform.gatleon.com")
6
8
  super() do
7
9
  extend ActiveSupport::Concern
8
10
 
@@ -25,10 +27,13 @@ module Gatleon
25
27
  define_method :_exchange_user_voucher_for_user do
26
28
  if params[:_authformForm] == form_uid && params[:_authformUserVoucher]
27
29
  # TODO: headers for api verification
28
- response = Faraday.get("https://authform.gatleon.com/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
30
+ response = Faraday.get("#{root_url}/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
29
31
 
30
32
  if response.status == 200
31
- cookies[_authform_user_cookie_key] = response.body
33
+ cookies[_authform_user_cookie_key] = {
34
+ value: response.body,
35
+ domain: :all
36
+ }
32
37
  end
33
38
 
34
39
  q = Rack::Utils.parse_query(URI.parse(request.url).query)
@@ -1,5 +1,5 @@
1
1
  module Gatleon
2
2
  module Rails
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gatleon-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - gatleon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday