File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -189,12 +189,14 @@ public static function getCom_apiVersion()
189189 */
190190 private static function getAuthMethod ()
191191 {
192+ $ app = Factory::getApplication ();
193+ $ key = $ app ->input ->get ('key ' );
192194
193195 if (isset ($ _SERVER ['HTTP_X_AUTH ' ]) && $ _SERVER ['HTTP_X_AUTH ' ])
194196 {
195197 $ authMethod = $ _SERVER ['HTTP_X_AUTH ' ];
196198 }
197- elseif (self ::getBearerToken ())
199+ elseif ($ key || self ::getBearerToken ())
198200 {
199201 $ authMethod = 'key ' ;
200202 }
Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ class ApiAuthenticationKey extends ApiAuthentication
3333 public function authenticate ()
3434 {
3535 $ header_token = $ this ->getBearerToken ();
36+
37+ if (!$ header_token )
38+ {
39+ $ app = Factory::getApplication ();
40+ $ header_token = $ app ->input ->get ('key ' );
41+ }
42+
3643 $ token = $ this ->loadTokenByHash ($ header_token );
3744
3845 if (isset ($ token ->state ) && $ token ->state == 1 )
You can’t perform that action at this time.
0 commit comments