maitre_d 0.6.0 → 0.6.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 +5 -5
- data/lib/maitre_d/api/authentication_guard.rb +8 -7
- data/maitre_d.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9eb99cbebe7410953efb631a11a6622f14f0fc7aff295916021c6737f8f263b8
|
|
4
|
+
data.tar.gz: 208609d75dbaf42bf79313cba27b3e1755f0823e60629ee7a1f68334c631907e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fd86a0cfc61d67b37d20d7be85eed36e58d0067df94aad8fcc7be8f13eada94077049f96044810122dd35a1a62089b1826c73a2fb15ce2a0e5181ae8f5de6ac
|
|
7
|
+
data.tar.gz: '09008f6dc9be814685295da03c416e39bcef6b4527947211deb58809bdfa2bceaef3aee1a78f8eca47be61960e55b695c52ca5f1a17eb43d766cf439abdf2c0a'
|
|
@@ -11,14 +11,15 @@ class MaitreD::API::AuthenticationGuard < Sliver::Hook
|
|
|
11
11
|
|
|
12
12
|
private
|
|
13
13
|
|
|
14
|
-
def
|
|
15
|
-
|
|
14
|
+
def expected_credentials
|
|
15
|
+
"#{action.configuration.id}:#{action.configuration.password}"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def provided_credentials
|
|
19
|
+
Base64.decode64 action.request.env['HTTP_AUTHORIZATION'].gsub(/^Basic /, '')
|
|
16
20
|
end
|
|
17
21
|
|
|
18
|
-
def valid_authorization
|
|
19
|
-
|
|
20
|
-
"#{action.configuration.id}:#{action.configuration.password}"
|
|
21
|
-
)
|
|
22
|
-
"Basic #{encoded_authorization}"
|
|
22
|
+
def valid_authorization?
|
|
23
|
+
provided_credentials == expected_credentials
|
|
23
24
|
end
|
|
24
25
|
end
|
data/maitre_d.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'maitre_d'
|
|
6
|
-
s.version = '0.6.
|
|
6
|
+
s.version = '0.6.1'
|
|
7
7
|
s.authors = ['Pat Allan']
|
|
8
8
|
s.email = ['pat@freelancing-gods.com']
|
|
9
9
|
s.homepage = 'http://github.com/flying-sphinx/maitre_d'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: maitre_d
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pat Allan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sliver
|
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
153
|
version: '0'
|
|
154
154
|
requirements: []
|
|
155
155
|
rubyforge_project: maitre_d
|
|
156
|
-
rubygems_version: 2.6
|
|
156
|
+
rubygems_version: 2.7.6
|
|
157
157
|
signing_key:
|
|
158
158
|
specification_version: 4
|
|
159
159
|
summary: Rack APIs for Heroku add-ons
|