devise_pam_authenticatable2 8.0.0 → 8.0.1
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/VERSION +1 -1
- data/devise_pam_authenticatable2.gemspec +3 -3
- data/lib/devise_pam_authenticatable/model.rb +7 -6
- 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: 482d5ad23ad00bffb983c333e6af0d99572fc0841ac1316e613f276ae1e7f0e8
|
|
4
|
+
data.tar.gz: 910ef5518bca33db2f0e718f7b42a7fa6f9abc44ef1cd5ad4d0ce3ab4a9bf9ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d07fad015738e2649b9967d5a61dfce29b98542c650361804365d6a03d94b1c0570e4f9a8ec108c2b86e12acb75daa1c6c5925a5f84ab58d5e05a5955b404ec
|
|
7
|
+
data.tar.gz: 671923dc009bd24848a05ec6e8d1818b3b938e8c1a47e662d2c2e319a641cc9c739b60f21c823ec071378b1063c83df84f247bff1f4d3088e5a208a59466ef04
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
8.0.
|
|
1
|
+
8.0.1
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: devise_pam_authenticatable2 8.0.
|
|
5
|
+
# stub: devise_pam_authenticatable2 8.0.1 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "devise_pam_authenticatable2".freeze
|
|
9
|
-
s.version = "8.0.
|
|
9
|
+
s.version = "8.0.1"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib".freeze]
|
|
13
13
|
s.authors = ["James Wilson".freeze, "Alexander Kaftan".freeze]
|
|
14
|
-
s.date = "2018-01-
|
|
14
|
+
s.date = "2018-01-18"
|
|
15
15
|
s.description = "For authenticating against PAM (Pluggable Authentication Modules)".freeze
|
|
16
16
|
s.email = "devkral@web.de".freeze
|
|
17
17
|
s.extra_rdoc_files = [
|
|
@@ -31,7 +31,7 @@ module Devise
|
|
|
31
31
|
def pam_conflict?
|
|
32
32
|
# detect a conflict
|
|
33
33
|
# use blank password as discriminator between traditional login and pam login
|
|
34
|
-
|
|
34
|
+
respond_to?('password') && password.present? && is_pam_account?
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def pam_conflict(_attributes)
|
|
@@ -66,11 +66,12 @@ module Devise
|
|
|
66
66
|
end
|
|
67
67
|
resource
|
|
68
68
|
elsif ::Devise.emailfield && attributes[:email]
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
resource =
|
|
70
|
+
if ::Devise.check_at_sign && ::Devise.usernamefield && !attributes[:email].index('@')
|
|
71
|
+
find_by(::Devise.usernamefield => attributes[:email])
|
|
72
|
+
else
|
|
73
|
+
find_by(::Devise.emailfield => attributes[:email])
|
|
74
|
+
end
|
|
74
75
|
|
|
75
76
|
if resource.blank?
|
|
76
77
|
resource = new
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devise_pam_authenticatable2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.0.
|
|
4
|
+
version: 8.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Wilson
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-01-
|
|
12
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: devise
|