devise_pam_authenticatable 1.0.2 → 1.0.3
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.
- data/README.md +6 -0
- data/VERSION +1 -1
- data/devise_pam_authenticatable.gemspec +2 -2
- data/lib/devise_pam_authenticatable/pam_adapter.rb +5 -0
- metadata +4 -4
data/README.md
CHANGED
@@ -41,6 +41,12 @@ In your Devise model, ensure the following is present:
|
|
41
41
|
|
42
42
|
end
|
43
43
|
|
44
|
+
Testing
|
45
|
+
-------
|
46
|
+
|
47
|
+
If the RAILS_ENV (environment) is set to 'test' then
|
48
|
+
devise_pam_authenticatable will authenticate a user
|
49
|
+
logging in as **testadmin** with password **test**
|
44
50
|
|
45
51
|
References
|
46
52
|
----------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{devise_pam_authenticatable}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["James Wilson"]
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
]
|
32
32
|
s.homepage = %q{http://github.com/jwilson511/devise_pam_authenticatable}
|
33
33
|
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version = %q{1.4.
|
34
|
+
s.rubygems_version = %q{1.4.2}
|
35
35
|
s.summary = %q{Devise PAM authentication module using rpam}
|
36
36
|
|
37
37
|
if s.respond_to? :specification_version then
|
@@ -6,6 +6,11 @@ module Devise
|
|
6
6
|
module PamAdapter
|
7
7
|
|
8
8
|
def self.valid_credentials?(username, password)
|
9
|
+
if Rails.env.test? && username = 'testadmin' && password == 'test' then
|
10
|
+
# If we're running in the test environment then return true
|
11
|
+
# if the username is testadmin and password is test
|
12
|
+
return true;
|
13
|
+
end
|
9
14
|
authpam(username, password)
|
10
15
|
end
|
11
16
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_pam_authenticatable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Wilson
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements: []
|
100
100
|
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.4.
|
102
|
+
rubygems_version: 1.4.2
|
103
103
|
signing_key:
|
104
104
|
specification_version: 3
|
105
105
|
summary: Devise PAM authentication module using rpam
|