auth1 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/README.md +2 -2
- data/app/helpers/auth1/sessions_helper.rb +7 -3
- data/lib/auth1/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: 81bf338779bcb9bdcd845b3f94694f01ca02ffcdb3a84327ea95becd922a41f4
|
|
4
|
+
data.tar.gz: be0da299fbaeca8eebf539f9b546e81b668076cfec79d7116e556271dadf4058
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 764fbf8f015239583cdf2bbf60d0ace7e63350d0c117bbd39385a52e06b606aba79747a6e9f4811ed97c72cde78c966d72e76dbfa2ab28dd1a8627ec414b47a6
|
|
7
|
+
data.tar.gz: 2f9acae1169921cf828d7ae7a14b290dd12cf3048520ee9326df89f88fb9248c9c8f97a93469f82038b0af66a591e9d2676dbb3b7a01222ceebb394da8bfe8a6
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Auth1 is a [Rails Engine](https://guides.rubyonrails.org/engines.html) for [Auth
|
|
|
7
7
|
|
|
8
8
|
#### Link Helpers
|
|
9
9
|
```ruby
|
|
10
|
-
<% if
|
|
10
|
+
<% if logged_in? -%>
|
|
11
11
|
<%= logout_link %>
|
|
12
12
|
<% else -%>
|
|
13
13
|
<%= login_link %>
|
|
@@ -19,7 +19,7 @@ Auth1 is a [Rails Engine](https://guides.rubyonrails.org/engines.html) for [Auth
|
|
|
19
19
|
|
|
20
20
|
#### Button Helpers
|
|
21
21
|
```ruby
|
|
22
|
-
<% if
|
|
22
|
+
<% if logged_in? -%>
|
|
23
23
|
<%= logout_button %>
|
|
24
24
|
<% else -%>
|
|
25
25
|
<%= login_button %>
|
|
@@ -17,7 +17,7 @@ module Auth1
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def login_or_logout_button(name = %w[Login Logout], options = [nil, nil], html_options = [nil, nil], &block)
|
|
20
|
-
if
|
|
20
|
+
if logged_in?
|
|
21
21
|
logout_html_options = html_options[1] || {}
|
|
22
22
|
logout_html_options[:method] = :get
|
|
23
23
|
logout_button(name[1], options[1], logout_html_options, &block)
|
|
@@ -43,7 +43,7 @@ module Auth1
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def login_or_logout_link(name = %w[Login Logout], options = [nil, nil], html_options = [nil, nil], &block)
|
|
46
|
-
if
|
|
46
|
+
if logged_in?
|
|
47
47
|
logout_html_options = html_options[1] || {}
|
|
48
48
|
logout_html_options[:method] = :get
|
|
49
49
|
logout_link(name[1], options[1], logout_html_options, &block)
|
|
@@ -54,8 +54,12 @@ module Auth1
|
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
def
|
|
57
|
+
def logged_in?
|
|
58
58
|
session['userinfo'].present?
|
|
59
59
|
end
|
|
60
|
+
|
|
61
|
+
def logged_out?
|
|
62
|
+
!logged_in?
|
|
63
|
+
end
|
|
60
64
|
end
|
|
61
65
|
end
|
data/lib/auth1/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: auth1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joon Lee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-05-
|
|
11
|
+
date: 2020-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth-auth0
|