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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gatleon/rails.rb +2 -0
- data/lib/gatleon/rails/authform/concern.rb +8 -3
- data/lib/gatleon/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4b40655779a5b7f2e42532ea4cd4628c32a01af3d162d5f23d65468bb21be2b
|
4
|
+
data.tar.gz: 5f5369651e7187f520539525b29226243c9eb0d8251afd5e86f7720627443bda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05aa8f1f5bc99ffb76f2c2684c63b76d3cb07285b8301b59c3d9d10e1b86ea80e35efac4164e151e5e1621d1f59b99733605559f382068aca784477237e0c985
|
7
|
+
data.tar.gz: 9ecc13a6cacec12cbf7f83d64f309c957a548e3f268ff02427614f4e4e938f61feef56bb6826b127785e7ffec509f8fd3d89fe02772c9b19ea60c009f9104217
|
data/Gemfile.lock
CHANGED
data/lib/gatleon/rails.rb
CHANGED
@@ -2,7 +2,9 @@ module Gatleon
|
|
2
2
|
module Rails
|
3
3
|
module Authform
|
4
4
|
class Concern < Module
|
5
|
-
def initialize(form_uid:,
|
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("
|
30
|
+
response = Faraday.get("#{root_url}/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
|
29
31
|
|
30
32
|
if response.status == 200
|
31
|
-
cookies[_authform_user_cookie_key] =
|
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)
|
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.
|
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-
|
11
|
+
date: 2020-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|