gatleon-authform-rails 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +1 -1
- data/lib/gatleon/authform/rails.rb +0 -1
- data/lib/gatleon/authform/rails/concern.rb +8 -0
- data/lib/gatleon/authform/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: 653570cc8138e798a9404b727ac68ec1f7351953cd59a7e7ece1f08284bffcff
|
|
4
|
+
data.tar.gz: a6ebd4fc079dd0d383e21201cd58e71adc23eed8de1759786b9813b57390688e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c01f61589cfc34bdccd07d1ae70789d78a378d9fd3d8665a67cedfd997a2532121f9d020f294575097bf49e73d88e85aeb58d5ddba1bf988488cd6ab7fc15aac
|
|
7
|
+
data.tar.gz: b7d9365cd368eaa4ccda1985dfe1e33f4ff36b124304a17dfdb364ca8b0de77edee9d6b75265bb06bba45b6cc506d87fa7a55e37bbc25c1f0a04c1c7d31018da
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
gatleon-authform-rails (0.
|
|
4
|
+
gatleon-authform-rails (0.7.0)
|
|
5
5
|
xxhash
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -87,7 +87,7 @@ GEM
|
|
|
87
87
|
nio4r (2.5.2)
|
|
88
88
|
nokogiri (1.10.9)
|
|
89
89
|
mini_portile2 (~> 2.4.0)
|
|
90
|
-
rack (2.2.
|
|
90
|
+
rack (2.2.3)
|
|
91
91
|
rack-test (1.1.0)
|
|
92
92
|
rack (>= 1.0, < 3)
|
|
93
93
|
rails (6.0.2.2)
|
|
@@ -143,7 +143,7 @@ GEM
|
|
|
143
143
|
thread_safe (~> 0.1)
|
|
144
144
|
websocket-driver (0.7.1)
|
|
145
145
|
websocket-extensions (>= 0.1.0)
|
|
146
|
-
websocket-extensions (0.1.
|
|
146
|
+
websocket-extensions (0.1.5)
|
|
147
147
|
xxhash (0.4.0)
|
|
148
148
|
yard (0.9.24)
|
|
149
149
|
zeitwerk (2.3.0)
|
data/README.md
CHANGED
|
@@ -52,7 +52,7 @@ class ProfileController < ActionController::Base
|
|
|
52
52
|
erb = <<~ERB
|
|
53
53
|
<p style="color: red;"><%= flash[:error] %></p>
|
|
54
54
|
<h1>Sign In</h1>
|
|
55
|
-
<form action="
|
|
55
|
+
<form action="<%= signon_url %>" method="POST">
|
|
56
56
|
<input type="hidden" name="successPath" value="/profile">
|
|
57
57
|
<input type="email" name="email">
|
|
58
58
|
<button type="submit">Sign In</button>
|
|
@@ -8,17 +8,25 @@ module Gatleon
|
|
|
8
8
|
secret_key:,
|
|
9
9
|
domain: nil,
|
|
10
10
|
current_user_method_name: "current_user",
|
|
11
|
+
signon_url_method_name: "signon_url",
|
|
11
12
|
_authform_base_url: "https://authformapi.gatleon.com")
|
|
12
13
|
super() do
|
|
13
14
|
extend ActiveSupport::Concern
|
|
14
15
|
|
|
15
16
|
included do
|
|
16
17
|
helper_method "#{current_user_method_name}".to_sym
|
|
18
|
+
helper_method "#{signon_url_method_name}".to_sym
|
|
19
|
+
|
|
17
20
|
before_action :_exchange_user_voucher_for_user
|
|
18
21
|
end
|
|
19
22
|
|
|
20
23
|
private
|
|
21
24
|
|
|
25
|
+
# defaults to signon_url
|
|
26
|
+
define_method signon_url_method_name do
|
|
27
|
+
"#{_authform_base_url}/v1/form/#{public_key}"
|
|
28
|
+
end
|
|
29
|
+
|
|
22
30
|
# defaults to current_user
|
|
23
31
|
define_method current_user_method_name do
|
|
24
32
|
begin
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gatleon-authform-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gatleon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-08-
|
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xxhash
|