acts_as_hoc_user 1.0.9 → 1.0.11

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
- SHA1:
3
- metadata.gz: 04a4d1e943e4adcb5f9d2dfd6eb5f0ceb3a6870b
4
- data.tar.gz: 8f6be6cde06f8e0348b66fc022cd2887b260b7ec
2
+ SHA256:
3
+ metadata.gz: d1b96e4da32b7e3543cb886d2aa717e1009833f511186a79e8444608f6181193
4
+ data.tar.gz: ee6f2640994e027c1b502cba6ed15a4d6ce7ef3f3ff9501ee6fb6847cf091158
5
5
  SHA512:
6
- metadata.gz: eb1fbf63d3f453bbe05fc7e1657efe38a43d8442b848d9972437a500a5fd7688dedcf865dbdf2b0ef9079792c3f775baec255c71ece23d954c34719ea5266f92
7
- data.tar.gz: be91bf5dc22042cda5034b528021aac32b7a680bf1672ee06e97fd9f1d04a2d07b699ef0a239cf06abce71d3aeb483d8d89a28eb60373d4fd5b1d4e36019d98d
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?
@@ -1,3 +1,3 @@
1
1
  module ActsAsHocUser
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.11"
3
3
  end
@@ -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.9
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: 2018-09-12 00:00:00.000000000 Z
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
- rubyforge_project:
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