gatleon-authform-rails 0.3.1 → 0.4.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04ed8f4e4e609113a7552950cad720ea3f662290239d8dbc0271c003c3d81e64
|
4
|
+
data.tar.gz: 6a5cf946f350be87459a9e9c1912781914129305e431e55589f53c5ad17b8833
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e0bbc47c53ccdad97b3e9a250d74453074be35234accada2d3ea01ac4da55814d83a7a6734fb09feef0a259c403f6d502a2ce6d4dbb528b2b83a1e6d2a1fc9
|
7
|
+
data.tar.gz: 5446f0557ed77ca70d46d68d6751414c829653a922f2ec749a5b0552067f894fad4ef541e330e6b7d0ecd0f95e4cbbcb6bfb6d4ae10e7d3d4300aaf217dfd581
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gatleon-authform-rails (0.
|
4
|
+
gatleon-authform-rails (0.4.0)
|
5
|
+
xxhash
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
@@ -143,6 +144,7 @@ GEM
|
|
143
144
|
websocket-driver (0.7.1)
|
144
145
|
websocket-extensions (>= 0.1.0)
|
145
146
|
websocket-extensions (0.1.4)
|
147
|
+
xxhash (0.4.0)
|
146
148
|
yard (0.9.24)
|
147
149
|
zeitwerk (2.3.0)
|
148
150
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "
|
1
|
+
require "xxhash"
|
2
2
|
|
3
3
|
module Gatleon
|
4
4
|
module Authform
|
@@ -23,7 +23,7 @@ module Gatleon
|
|
23
23
|
define_method current_user_method_name do
|
24
24
|
begin
|
25
25
|
Gatleon::Authform::Rails::User.new(_cookies: cookies,
|
26
|
-
|
26
|
+
_authform_user_cookie_key: _authform_user_cookie_key,
|
27
27
|
_form_secret_key: secret_key,
|
28
28
|
_domain: domain,
|
29
29
|
_authform_base_url: _authform_base_url)
|
@@ -51,7 +51,7 @@ module Gatleon
|
|
51
51
|
end
|
52
52
|
|
53
53
|
define_method :_authform_user_cookie_key do
|
54
|
-
|
54
|
+
"#{public_key}_#{XXhash.xxh32(domain)}"
|
55
55
|
end
|
56
56
|
|
57
57
|
define_method :_cookie_attrs do |value|
|
@@ -7,12 +7,12 @@ module Gatleon
|
|
7
7
|
PERMITTED_CHARS = /\A[a-zA-Z0-9_)]*\z/
|
8
8
|
|
9
9
|
def initialize(_cookies:,
|
10
|
-
|
10
|
+
_authform_user_cookie_key:,
|
11
11
|
_form_secret_key:,
|
12
12
|
_domain:,
|
13
13
|
_authform_base_url:)
|
14
14
|
@_cookies = _cookies
|
15
|
-
@
|
15
|
+
@_authform_user_cookie_key = _authform_user_cookie_key
|
16
16
|
@_form_secret_key = _form_secret_key
|
17
17
|
@_domain = _domain
|
18
18
|
@_authform_base_url = _authform_base_url
|
@@ -61,15 +61,14 @@ module Gatleon
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def _json
|
64
|
-
@_json ||= JSON.parse(@_cookies[@
|
64
|
+
@_json ||= JSON.parse(@_cookies[@_authform_user_cookie_key])
|
65
65
|
end
|
66
66
|
|
67
67
|
def signoff!
|
68
68
|
if @_domain
|
69
|
-
@_cookies.delete(@
|
70
|
-
@_cookies.delete(@_form_public_key, domain: @_domain)
|
69
|
+
@_cookies.delete(@_authform_user_cookie_key, domain: @_domain)
|
71
70
|
else
|
72
|
-
@_cookies.delete(@
|
71
|
+
@_cookies.delete(@_authform_user_cookie_key)
|
73
72
|
end
|
74
73
|
end
|
75
74
|
alias_method :sign_off!, :signoff!
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.4.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-05-
|
12
|
-
dependencies:
|
11
|
+
date: 2020-05-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: xxhash
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: add authentication to your application - in 1 minute or less
|
14
28
|
email:
|
15
29
|
- ''
|