http_base_auth 0.0.2.2 → 0.0.2.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/lib/http_base_auth.rb +16 -9
- data/lib/http_base_auth/version.rb +1 -1
- metadata +3 -3
data/lib/http_base_auth.rb
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
module HttpBaseAuth
|
2
2
|
|
3
|
-
def
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
def reset_authentication
|
4
|
+
authentication.reset
|
5
|
+
end
|
6
|
+
|
7
|
+
def process_authentication
|
8
|
+
if authentication.required?
|
9
|
+
authenticate_or_request_with_http_basic do |username, password|
|
10
|
+
authentication.validate(username, password)
|
11
|
+
end
|
12
|
+
else
|
13
|
+
true
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def authentication
|
18
|
+
@authentication ||= CookiesAuthentication.new(Rails.application.config.auth, cookies)
|
11
19
|
end
|
12
|
-
end
|
13
20
|
end
|
14
21
|
|
15
22
|
class ActionController::Base
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_base_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 65
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 2
|
10
|
-
-
|
11
|
-
version: 0.0.2.
|
10
|
+
- 3
|
11
|
+
version: 0.0.2.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Macj
|