Drupal 8  8.0.2
BasicAuth Class Reference
Inheritance diagram for BasicAuth:

Public Member Functions

 __construct (ConfigFactoryInterface $config_factory, UserAuthInterface $user_auth, FloodInterface $flood, EntityManagerInterface $entity_manager)
 
 applies (Request $request)
 
 authenticate (Request $request)
 
 challengeException (Request $request,\Exception $previous)
 

Protected Attributes

 $configFactory
 
 $userAuth
 
 $flood
 
 $entityManager
 

Detailed Description

HTTP Basic authentication provider.

Constructor & Destructor Documentation

__construct ( ConfigFactoryInterface  $config_factory,
UserAuthInterface  $user_auth,
FloodInterface  $flood,
EntityManagerInterface  $entity_manager 
)

Constructs a HTTP basic authentication provider object.

Parameters
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.
\Drupal\user\UserAuthInterface$user_authThe user authentication service.
\Drupal\Core\Flood\FloodInterface$floodThe flood service.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager service.

References Drupal\configFactory(), Drupal\entityManager(), and Drupal\flood().

Here is the call graph for this function:

Member Function Documentation

applies ( Request  $request)

{Checks whether suitable authentication credentials are on the request.

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
bool TRUE if authentication credentials suitable for this provider are on the request, FALSE otherwise.
}

Implements AuthenticationProviderInterface.

authenticate ( Request  $request)

{Authenticates the user.

Parameters
\Symfony\Component\HttpFoundation\Request | NULL$requestThe request object.
Returns
|NULL AccountInterface - in case of a successful authentication. NULL - in case where authentication failed.
}

Implements AuthenticationProviderInterface.

References Drupal\configFactory(), Drupal\entityManager(), and Drupal\flood().

Here is the call graph for this function:

challengeException ( Request  $request,
\Exception  $previous 
)

{Constructs an exception which is used to generate the challenge.

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe request.
\Exception$previousThe previous exception.
Returns
|NULL An exception to be used in order to generate an authentication challenge.
}

Implements AuthenticationProviderChallengeInterface.

References Drupal\configFactory(), and SafeMarkup\format().

Here is the call graph for this function:


The documentation for this class was generated from the following file: