Skip to content

Commit

Permalink
Merge pull request #199 from goetas/interactive-login
Browse files Browse the repository at this point in the history
The saml authenticator is an interactive authenticator
  • Loading branch information
a-menshchikov authored Nov 23, 2022
2 parents 7975fc8 + 4f6ca38 commit aee3450
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Security/Http/Authenticator/SamlAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
Expand All @@ -32,7 +32,7 @@
use Symfony\Component\Security\Http\HttpUtils;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

class SamlAuthenticator implements AuthenticatorInterface, AuthenticationEntryPointInterface
class SamlAuthenticator implements InteractiveAuthenticatorInterface, AuthenticationEntryPointInterface
{
private $httpUtils;
private $userProvider;
Expand Down Expand Up @@ -131,6 +131,11 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
return $this->failureHandler->onAuthenticationFailure($request, $exception);
}

public function isInteractive(): bool
{
return true;
}

protected function createPassport(): Passport
{
$attributes = $this->extractAttributes();
Expand Down

0 comments on commit aee3450

Please sign in to comment.