File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,14 @@ abstract class Adapter implements AdapterInterface
24
24
* Return authentication credentials from request.
25
25
*
26
26
* @param ServerRequestInterface $request
27
+ * @param bool $check_password
27
28
* @return array
28
29
*/
29
- protected function getAuthenticationCredentialsFromRequest (ServerRequestInterface $ request )
30
+ protected function getAuthenticationCredentialsFromRequest (ServerRequestInterface $ request, $ check_password = true )
30
31
{
31
32
$ credentials = $ request ->getParsedBody ();
32
33
33
- if (!is_array ($ credentials ) || empty ($ credentials ['username ' ]) || empty ($ credentials ['password ' ])) {
34
+ if (!is_array ($ credentials ) || empty ($ credentials ['username ' ]) || ( $ check_password && empty ($ credentials ['password ' ]) )) {
34
35
throw new InvalidAuthenticateRequest ();
35
36
}
36
37
You can’t perform that action at this time.
0 commit comments