Symfony2 API
Class

Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider

class AnonymousAuthenticationProvider implements AuthenticationProviderInterface

AnonymousAuthenticationProvider validates AnonymousToken instances.

Methods

__construct(string $key)

Constructor.

TokenInterface authenticate(TokenInterface $token)

Attempts to authenticates a TokenInterface object.

Boolean supports(TokenInterface $token)

Checks whether this provider supports the given token.

Details

at line 32
public __construct(string $key)

Constructor.

Parameters

string $key The key shared with the authentication token

at line 40
public TokenInterface authenticate(TokenInterface $token)

Attempts to authenticates a TokenInterface object.

Parameters

TokenInterface $token The TokenInterface instance to authenticate

Return Value

TokenInterface An authenticated TokenInterface instance, never null

Exceptions

AuthenticationException if the authentication fails

at line 56
public Boolean supports(TokenInterface $token)

Checks whether this provider supports the given token.

Parameters

TokenInterface $token A TokenInterface instance

Return Value

Boolean true if the implementation supports the Token, false otherwise