restful_api_authentication 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change History / Release Notes
2
2
 
3
+ ## Version 0.2.2
4
+ * Closed Issue #5 - Improperly formatted timestamps result in an uncaught exception
5
+
3
6
  ## Version 0.2.1
4
7
 
5
8
  * Closed Issue #3 - Failing to define an environment in the YML causes a fatal error
data/README.md CHANGED
@@ -4,8 +4,6 @@ RestfulApiAuthentication is a gem which implements a standard api_key/secret aut
4
4
 
5
5
  With most RESTful Web API's, it is important to know which app is using your resources and that only the apps you allow access those resources. This gem allows you to easily add this layer of authentication to any Rails RESTful resource you want, and it even includes protection against various forms of attack.
6
6
 
7
- Go here to read a more lengthy description of the problem this gem is attempting to solve: [Authentication of a Ruby on Rails RESTful Web API / Service](http://www.djkiger.com/?p=41)
8
-
9
7
  ## Requirements
10
8
 
11
9
  1. Rails 3.2.0+
@@ -85,8 +83,9 @@ class MyTestApi
85
83
  end
86
84
 
87
85
  def authenticate_test
88
- request_uri = "https://api.mywebservice.com/help/authenticate"
89
- self.class.post(request_uri, { :headers => auth_headers(request_uri) })
86
+ base_url = "https://api.mywebservice.com"
87
+ end_point = "/help/authenticate"
88
+ self.class.post(base_url + end_point, { :headers => auth_headers(end_point) })
90
89
  end
91
90
 
92
91
  end
@@ -39,7 +39,7 @@ module RestfulApiAuthentication
39
39
  return_val = false
40
40
  if headers_have_values?
41
41
  if in_time_window?
42
- if test_hash == @http_headers[@@header_signature]
42
+ if test_hash.downcase == @http_headers[@@header_signature].downcase
43
43
  if options[:require_master] == true
44
44
  if is_master?
45
45
  return_val = true
@@ -106,4 +106,4 @@ module RestfulApiAuthentication
106
106
  end
107
107
 
108
108
  end
109
- end
109
+ end
@@ -22,5 +22,5 @@
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
24
  module RestfulApiAuthentication
25
- VERSION = "0.2.2"
25
+ VERSION = "0.2.3"
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_api_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-05 00:00:00.000000000 Z
12
+ date: 2013-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70287685333760 !ruby/object:Gem::Requirement
16
+ requirement: &70257440207460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70287685333760
24
+ version_requirements: *70257440207460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: uuid
27
- requirement: &70287685332920 !ruby/object:Gem::Requirement
27
+ requirement: &70257440206640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.3.5
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70287685332920
35
+ version_requirements: *70257440206640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: chronic
38
- requirement: &70287685332320 !ruby/object:Gem::Requirement
38
+ requirement: &70257440205960 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 0.6.7
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70287685332320
46
+ version_requirements: *70257440205960
47
47
  description: A gem which implements a standard api_key / secret authentication system
48
48
  for your Ruby on Rails RESTful web services.
49
49
  email: