Update lib/oauth2_basic_authenticator.rb

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
Natalie Tay 2024-03-21 17:34:28 +08:00 committed by GitHub
parent c4e41d9250
commit 2403b33ee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class OAuth2BasicAuthenticator < Auth::ManagedAuthenticator
return nil unless fragment.is_a?(Hash) || fragment.is_a?(Array)
first_seg = segments[seg_index].scan(/([\d+])/).length > 0 ? first_seg.split("[")[0] : first_seg
if fragment.is_a?(Hash)
deref = fragment.key?(first_seg) ? fragment[first_seg] : fragment[first_seg.to_sym]
deref = fragment[first_seg]
else
array_index = 0
if (seg_index > 0)