simple_api_auth 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Simple API Key Authentication
2
2
 
3
3
  A Rack middleware and Railtie(for Rails3) for API key authentication.
4
- It will authenticate all requests to /api/* or /apis/*
4
+ It will authenticate all requests to /api/*
5
5
 
6
6
  ## Usage
7
7
 
@@ -16,7 +16,7 @@ module SimpleApiAuth
16
16
  def call(env)
17
17
  path = env['PATH_INFO']
18
18
  if path =~ @@api_path_matcher
19
- api_key = env["Authorization"] || Rack::Request.new(env).params['api_key']
19
+ api_key = env["HTTP_AUTHORIZATION"] || Rack::Request.new(env).params['api_key']
20
20
  unless api_key == @@api_key
21
21
  return @@unauthorized_response
22
22
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "simple_api_auth"
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Wen-Tien Chang"]
8
8
  s.email = ["ihower@gmail.com"]
9
- s.homepage = "http://ihower.tw"
9
+ s.homepage = "https://github.com/ihower/simple_api_auth"
10
10
  s.summary = %q{Simple API Key Authentication}
11
11
  s.description = %q{A Rack middleware and Railtie(for Rails3) for API key authentication.}
12
12
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_api_auth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wen-Tien Chang
@@ -69,7 +69,7 @@ files:
69
69
  - spec/lib/simple_api_auth_spec.rb
70
70
  - spec/spec_helper.rb
71
71
  has_rdoc: true
72
- homepage: http://ihower.tw
72
+ homepage: https://github.com/ihower/simple_api_auth
73
73
  licenses: []
74
74
 
75
75
  post_install_message: