Skip to content

Commit 132e7d5

Browse files
committed
Auth: Add JSON format requirement to LDAP login route and update authenticator logic
1 parent 8ce9e18 commit 132e7d5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/CoreBundle/Controller/SecurityController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function loginTokenCheck(): Response
224224
/**
225225
* @see LdapAuthenticator
226226
*/
227-
#[Route('/login/ldap/check', name: 'login_ldap_check', methods: ['POST'])]
227+
#[Route('/login/ldap/check', name: 'login_ldap_check', methods: ['POST'], format: 'json')]
228228
public function ldapLoginCheck(AuthenticationConfigHelper $authConfigHelper): Response
229229
{
230230
$ldapConfig = $authConfigHelper->getLdapConfig();

src/CoreBundle/Security/Authenticator/Ldap/LdapAuthenticator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public function supports(Request $request): ?bool
9797
}
9898

9999
return 'login_ldap_check' === $request->attributes->get('_route')
100-
&& $request->headers->has('Authorization')
101100
&& $request->isMethod('POST');
102101
}
103102

0 commit comments

Comments
 (0)