class UsernamePassword in DRD Agent 4.0.x
Same name and namespace in other branches
- 8.3 src/Agent/Auth/UsernamePassword.php \Drupal\drd_agent\Agent\Auth\UsernamePassword
Implements the UsernamePassword authentication method.
Hierarchy
- class \Drupal\drd_agent\Agent\Auth\Base implements BaseInterface
- class \Drupal\drd_agent\Agent\Auth\UsernamePassword
Expanded class hierarchy of UsernamePassword
1 string reference to 'UsernamePassword'
- Base::getMethods in src/
Agent/ Auth/ Base.php - Get a list of all implemented authentication methods.
File
- src/
Agent/ Auth/ UsernamePassword.php, line 10
Namespace
Drupal\drd_agent\Agent\AuthView source
class UsernamePassword extends Base {
/**
* {@inheritdoc}
*/
public function validate(array $settings) : bool {
if ($this->currentUser
->isAuthenticated()) {
return TRUE;
}
return $this->userAuth
->authenticate($settings['username'], $settings['password']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Base:: |
protected | property | ||
Base:: |
protected | property | ||
Base:: |
protected | property | All the settings of the implementing authentication method. | |
Base:: |
protected | property | ||
Base:: |
public static | function | ||
Base:: |
public static | function |
Get a list of all implemented authentication methods. Overrides BaseInterface:: |
|
Base:: |
final public | function |
Verify if the given UUID is authorised to access this site. Overrides BaseInterface:: |
|
Base:: |
public | function | Base constructor. | |
UsernamePassword:: |
public | function |
Validate authentication of the current request with the given settings. Overrides BaseInterface:: |