ahoy_panel 0.0.7 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30ad1497fbf5bf2457d257333673b84c928df34e620669bdd54139f6e08139ef
4
- data.tar.gz: 0edb2465e6c4780691b4ccdac95e26eaafe9d2e2b083396664fb8e05f2c7dc96
3
+ metadata.gz: 215f2e0248530bff5ab62740cb48d0856c2e38a85b35ddcad16afe9effee4c6d
4
+ data.tar.gz: '09f8666d8477a9a847e42683caa7f9d8a188b431bd5d1df08b7bee88fad2fded'
5
5
  SHA512:
6
- metadata.gz: a66637704dab635875a85244c19f2937c3ca54d85e5df9fbe079516def52dc27d991c94db4714f41796cfe4290967719002fb37e49e7e3321a0e9bcc5e8565d3
7
- data.tar.gz: b1e106a8825fd6f90db2eb52dd37dbd1f51c37bdb9e94a8ceb98d37f0030584a550cb75c0afa28e7c9ab2f0cd9de6d53c98e2ece401b7e0bf188c4a01a8b2580
6
+ metadata.gz: 5a9d593d26372bb2eb326518ea06be1a3b261768dad128d84b124e17f61729b36e4be42cdeebf92910ac498a9034cb3af2a7267e39a8e521060552a11b974de2
7
+ data.tar.gz: 81157d35b6aa939c4f409cc527e8bc32249c72415429d8520fce11a7d3847afc0838b9ac116427eecc986d53b74f9c957124286f877110473a9c5535fe6bb858
@@ -5,25 +5,9 @@ module AhoyPanel
5
5
  protected
6
6
 
7
7
  def authenticate_api_key!
8
- api_key = request.headers["Ahoy-Panel-Api-Key"]
8
+ api_key = request.headers["Ahoy-Panel-Api-Key"].remove("Bearer").squish
9
9
 
10
- return true if Rails.env.development?
11
-
12
- ahoy_panel_root_url = "https://www.ahoypanel.com"
13
-
14
- client = Faraday.new(url: ahoy_panel_root_url) do |conn|
15
- conn.headers["Ahoy-Panel-Api-Key"] = "#{api_key}"
16
- conn.request :json
17
- conn.response :json
18
- end
19
-
20
- response = client.get("/api_key_verify")
21
-
22
- client = Faraday.new(url: ahoy_panel_root_url)
23
-
24
- if !response.body["verified"]
25
- client.get("/invalid_api_key")
26
- end
10
+ raise if api_key != ::AhoyPanel.config.api_key
27
11
  end
28
12
  end
29
13
  end
@@ -1,3 +1,3 @@
1
1
  module AhoyPanel
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Jeon