acts_as_hoc_user 1.0.9 → 1.0.11
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d1b96e4da32b7e3543cb886d2aa717e1009833f511186a79e8444608f6181193
|
4
|
+
data.tar.gz: ee6f2640994e027c1b502cba6ed15a4d6ce7ef3f3ff9501ee6fb6847cf091158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62119dc0c23ee27943c3fc9b5d184272618d2f75a0274c0461962b7e11ea72a33f01affeb4761b1b89674f56d7a58a75ebc9dc71441ea35831178c76e3aa8a8a
|
7
|
+
data.tar.gz: 6abb48294fa67fea69fa734b9edbd8a0a0d92bd4b0bc9808ce614349331477326f95383bdc2259c414fc6b96cc433e96d4aabe981c9e6767164526ce8bdd30a5
|
@@ -17,6 +17,12 @@
|
|
17
17
|
nil
|
18
18
|
end
|
19
19
|
|
20
|
+
def authenticate_with_sso_token(token)
|
21
|
+
user = User.find_by(sso_token: token)
|
22
|
+
return nil if user.nil?
|
23
|
+
return user.authentication_token(expiration)
|
24
|
+
end
|
25
|
+
|
20
26
|
def authenticate_with_authentication_token(token)
|
21
27
|
decoded_auth_token = JsonWebToken.decode(token)
|
22
28
|
return nil if decoded_auth_token.nil?
|
@@ -4,6 +4,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
|
|
4
4
|
t.string :email, index: {unique: true}, null: false
|
5
5
|
t.string :password_digest
|
6
6
|
t.string :name, null: false, default: ''
|
7
|
+
t.string :sso_token, null: true
|
7
8
|
<% migration_colums.each do |column| -%>
|
8
9
|
<%= column %>
|
9
10
|
<% end -%>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_hoc_user
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Lavsen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -109,8 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
|
113
|
-
rubygems_version: 2.6.13
|
112
|
+
rubygems_version: 3.1.2
|
114
113
|
signing_key:
|
115
114
|
specification_version: 4
|
116
115
|
summary: Easy authentication with JWT
|