app_rail-airtable 0.4.8 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d413292d55b91966eeed50458ef1cd264cc278add196d53fbab2633dfd406d3
4
- data.tar.gz: e16281efca091bc9d9e2dc2abf2f81c4c16416cd9cf27a6b34127bd191899bb0
3
+ metadata.gz: 208213f6a53029eb29b4d98ed9b6d4f9bb7bb0375d3a5de3866615c8701ec3d9
4
+ data.tar.gz: 5aea3eda06422225f87170aa3b1d8a8a3310123fb151a554b29ad8059db72847
5
5
  SHA512:
6
- metadata.gz: a4c6b3fe35603c645186b1d45d67d16f4afa1d556500abb1f5467b9ae78be4b29dc847e85a9c3379ecf75ebf0b94894e5d620557096eec9abad06d8e1248017b
7
- data.tar.gz: e61beebcf401102669f1707ddc4f2a5b6b9f7d25585b05cbace9198a1d55196739ca22e73297699fc5413c1226d1a050c754cd7f2fdbd49bdc34a436950dd90f
6
+ metadata.gz: 975099138a2b7aef7ae085a09d7ace624f6b7eba9c892691807505ec44f8322dbf8b3a474113ecb3053b6d8243264db97531607ec2cfc3b4ad8907c253242dc0
7
+ data.tar.gz: 2b07588a9c2c375a0b4574a4500921c40f306c45bf153fd530520b7874716f4fbdb3b4cd56ade60c5dba9827b097052833e8827b4b564a83303af47bb4373af7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-airtable (0.4.8)
4
+ app_rail-airtable (0.5.0)
5
5
  activesupport
6
6
  airrecord
7
7
  app_rail-steps
@@ -23,7 +23,7 @@ GEM
23
23
  faraday (>= 1.0, < 3.0)
24
24
  faraday-net_http_persistent
25
25
  net-http-persistent
26
- app_rail-steps (0.2.16)
26
+ app_rail-steps (0.2.17)
27
27
  bcrypt (3.1.18)
28
28
  byebug (11.1.3)
29
29
  concurrent-ruby (1.1.10)
@@ -26,6 +26,10 @@ module AppRail
26
26
  ENV.fetch('OAUTH_CLIENT_ID')
27
27
  end
28
28
 
29
+ def oauth_client_secret
30
+ ENV.fetch('OAUTH_CLIENT_SECRET')
31
+ end
32
+
29
33
  def authenticate!
30
34
  halt 401 unless current_user
31
35
  end
@@ -69,6 +69,7 @@ module AppRail
69
69
  def self.sign_in_route(name)
70
70
  post "/#{name}/session" do
71
71
  halt [401, { error: 'Invalid client_id' }.to_json] unless params['client_id'] == oauth_client_id
72
+ halt [401, { error: 'Invalid client_secret' }.to_json] unless params['client_secret'] == oauth_client_secret
72
73
 
73
74
  resource = name.classify_constantize.authenticate_by_params(params)
74
75
  halt [401, { error: 'Invalid credentials' }.to_json] unless resource
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Airtable
5
- VERSION = '0.4.8'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
@@ -7,8 +7,8 @@ ruby '3.1.2'
7
7
 
8
8
  gem 'app_rail-airtable'
9
9
  gem 'app_rail-steps'
10
- gem 'sinatra', '~> 3.0', '>= 3.0.2'
11
10
  gem 'puma'
11
+ gem 'sinatra', '~> 3.0', '>= 3.0.2'
12
12
 
13
13
  group :development do
14
14
  gem 'dotenv'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_rail-airtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith