GuardAuthenticatorInterface::createAuthenticatedToken()

GuardTokenInterface createAuthenticatedToken(UserInterface $user, string $providerKey) Create an authenticated token for the given user. If you don't care about which token class is used or don't really understand what a "token" is, you can skip this method by extending the AbstractGuardAuthenticator class from your authenticator. Parameters UserInterface $user string $providerKey The provider (i.e. firewall) key Return Value GuardTokenInterface See also AbstractGuardAuthent

GuardAuthenticatorInterface::checkCredentials()

bool checkCredentials(mixed $credentials, UserInterface $user) Returns true if the credentials are valid. If any value other than true is returned, authentication will fail. You may also throw an AuthenticationException if you wish to cause authentication to fail. The credentials are the return value from getCredentials() Parameters mixed $credentials UserInterface $user Return Value bool Exceptions AuthenticationException

GuardAuthenticatorInterface

interface GuardAuthenticatorInterface implements AuthenticationEntryPointInterface The interface for all "guard" authenticators. The methods on this interface are called throughout the guard authentication process to give you the power to control most parts of the process from one location. Methods Response start(Request $request, AuthenticationException $authException = null) Returns a response that directs the user to authenticate. from AuthenticationEntryPointInterface mixed|null

GuardAuthenticatorHandler::handleAuthenticationSuccess()

null|Response handleAuthenticationSuccess(TokenInterface $token, Request $request, GuardAuthenticatorInterface $guardAuthenticator, string $providerKey) Returns the "on success" response for the given GuardAuthenticator. Parameters TokenInterface $token Request $request GuardAuthenticatorInterface $guardAuthenticator string $providerKey The provider (i.e. firewall) key Return Value null|Response

GuardAuthenticatorHandler::handleAuthenticationFailure()

null|Response handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, GuardAuthenticatorInterface $guardAuthenticator, string $providerKey) Handles an authentication failure and returns the Response for the GuardAuthenticator. Parameters AuthenticationException $authenticationException Request $request GuardAuthenticatorInterface $guardAuthenticator string $providerKey The key of the firewall Return Value null|Response

GuardAuthenticatorHandler::authenticateWithToken()

authenticateWithToken(TokenInterface $token, Request $request) Authenticates the given token in the system. Parameters TokenInterface $token Request $request

GuardAuthenticatorHandler::authenticateUserAndHandleSuccess()

Response|null authenticateUserAndHandleSuccess(UserInterface $user, Request $request, GuardAuthenticatorInterface $authenticator, string $providerKey) Convenience method for authenticating the user and returning the Response if any for success. Parameters UserInterface $user Request $request GuardAuthenticatorInterface $authenticator string $providerKey The provider (i.e. firewall) key Return Value Response|null

GuardAuthenticatorHandler

class GuardAuthenticatorHandler A utility class that does much of the work during the guard authentication process. By having the logic here instead of the listener, more of the process can be called directly (e.g. for manual authentication) or overridden. Methods __construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null) authenticateWithToken(TokenInterface $token, Request $request) Authenticates the given token in the system. null|Respon

GuardAuthenticationProvider::supports()

bool supports(TokenInterface $token) Checks whether this provider supports the given token. Parameters TokenInterface $token A TokenInterface instance Return Value bool true if the implementation supports the Token, false otherwise

GuardAuthenticationProvider::authenticate()

TokenInterface authenticate(TokenInterface $token) Finds the correct authenticator for the token and calls it. Parameters TokenInterface $token The TokenInterface instance to authenticate Return Value TokenInterface An authenticated TokenInterface instance, never null