interface AuthenticationProviderInterface (View source)

Interface for authentication providers.

Methods

bool
applies(Request $request)

Checks whether suitable authentication credentials are on the request.

authenticate(Request $request)

Authenticates the user.

Details

bool applies(Request $request)

Checks whether suitable authentication credentials are on the request.

Parameters

Request $request

The request object.

Return Value

bool

TRUE if authentication credentials suitable for this provider are on the request, FALSE otherwise.

AccountInterface|null authenticate(Request $request)

Authenticates the user.

Parameters

Request $request

The request object.

Return Value

AccountInterface|null

AccountInterface - in case of a successful authentication. NULL - in case where authentication failed.