File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
samples/server/petstore/php-slim4/lib/App Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -905,25 +905,25 @@ public function __invoke(\Slim\App $app): void
905
905
$ authenticatorConfig = [
906
906
'path ' => '/ ' ,
907
907
'authenticator ' => new ApiKeyAuthenticator ,
908
- 'regex ' => '/\s+ (.*)$/i ' ,
908
+ 'regex ' => '/\s* (.*)$/i ' ,
909
909
'argument ' => null ,
910
910
'attribute ' => 'authorization_token ' ,
911
911
'error ' => ['OpenAPIServer\Auth\ApiKeyAuthenticator ' , 'handleUnauthorized ' ],
912
912
];
913
913
if ($ authMethod ['isKeyInHeader ' ]) {
914
- $ authenticatorConfig = [
914
+ $ authenticatorConfig + = [
915
915
'header ' => $ authMethod ['keyParamName ' ],
916
916
'parameter ' => null ,
917
917
'cookie ' => null ,
918
918
];
919
919
} else if ($ authMethod ['isKeyInQuery ' ]) {
920
- $ authenticatorConfig = [
920
+ $ authenticatorConfig + = [
921
921
'header ' => null ,
922
922
'parameter ' => $ authMethod ['keyParamName ' ],
923
923
'cookie ' => null ,
924
924
];
925
925
} else if ($ authMethod ['isKeyInCookie ' ]) {
926
- $ authenticatorConfig = [
926
+ $ authenticatorConfig + = [
927
927
'header ' => null ,
928
928
'parameter ' => null ,
929
929
'cookie ' => $ authMethod ['keyParamName ' ],
You can’t perform that action at this time.
0 commit comments