panda_pal 5.14.0.beta1 → 5.14.0.beta2

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: 7dca28a2b62bd99b38f8e03e56ff2ca800a9e4783e3758e3f111d724033ecac9
4
- data.tar.gz: 50cca8089331c5e3ced69508bd36ce38d1950f36e24c32ddcfe8013c5d203b08
3
+ metadata.gz: 2a169e8ab762d1277b843dcd3258f04f4c8d790c8451a3b71944972445a3131c
4
+ data.tar.gz: 6e8c814fbab86bbefb78ed929deb82c55cc95c535b9219774779cb5741e57264
5
5
  SHA512:
6
- metadata.gz: c311c03565a44e28c27824ee5577844ea6c0cf5b1270135dcd32f888aab9f8b06466af1c55d445d194c006d89cedad547dc84b70e6655cb5c2962d0968a7e030
7
- data.tar.gz: 576674c1989edfdfb1f6bd6f8368c52be0bd9b6b92cf76cdc8ce6903650aec5fb41b4514f411ca2024fc6bc500d6e438a9e0fa901c4380acb6d3981eca082575
6
+ metadata.gz: 35640ce2bebedc8ee1fdcd8f280ae0d8c789e70a5173be1b750b829606232a620b2db920277fa13b6215c33d52561e337e1fc41b68df474578b160f2d0e7b991
7
+ data.tar.gz: 12ec28ef838177337e4d7f10bdfda28a77d90db8d721d5aeaf2d95863fa48e288882400d4b86d0b8b15e6440cd055bcf982aa6b94569ad9284d32f9e276ec342
@@ -233,15 +233,17 @@ module PandaPal::Helpers
233
233
  end
234
234
 
235
235
  def self.extract_panda_token(request, params = request.params)
236
- headers = request.respond_to?(:headers) ? request.headers : request.env
237
- auth_header = headers['HTTP_X_PANDA_TOKEN'] || headers['X-Panda-Token']
238
- auth_header ||= headers['HTTP_AUTHORIZATION'] || headers['Authorization']
239
-
240
- if auth_header.present?
241
- match = auth_header.match(/Bearer (.+)/)
242
- match ||= auth_header.match(/token=(.+)/) # Legacy Support
243
- token = match[1] if match && match[1].include?('.')
236
+ token = headers['HTTP_X_PANDA_TOKEN'] || headers['X-Panda-Token']
237
+
238
+ token ||= begin
239
+ headers = request.respond_to?(:headers) ? request.headers : request.env
240
+ if (auth_header = headers['HTTP_AUTHORIZATION'] || headers['Authorization']).present?
241
+ match = auth_header.match(/Bearer panda:(.+)/)
242
+ match ||= auth_header.match(/token=(.+)/) # Legacy Support
243
+ token = match[1] if match && match[1].include?('.')
244
+ end
244
245
  end
246
+
245
247
  token ||= params["panda_token"]
246
248
  token ||= params["session_token"] if params["session_token"]&.include?('.') # Legacy Support
247
249
  token ||= params["session_key"] if params["session_key"]&.include?('.') # Legacy Support
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.14.0.beta1"
2
+ VERSION = "5.14.0.beta2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.14.0.beta1
4
+ version: 5.14.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-16 00:00:00.000000000 Z
11
+ date: 2025-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails