Merge pull request #5 from el-abdel/fix/deprecation

fix deprecated response
This commit is contained in:
El. Abdellah
2022-03-06 15:26:32 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
class KeycloakBearerAuthenticator extends AbstractAuthenticator
@@ -31,7 +31,7 @@ class KeycloakBearerAuthenticator extends AbstractAuthenticator
return true;
}
public function authenticate(Request $request): PassportInterface
public function authenticate(Request $request): Passport
{
$token = $request->headers->get('Authorization');
if (null === $token || empty($token)) {

View File

@@ -85,7 +85,7 @@ class KeycloakBearerUserProvider implements UserProviderInterface{
*/
public function supportsClass(string $class)
{
return KeycloakBearerUser::class === $class || is_subclass_of(KeycloakBearerUser, User::class);
return KeycloakBearerUser::class === $class || is_subclass_of($class, KeycloakBearerUser::class);
}