class ExternalAuthLoginEvent in External Authentication 2.0.x
Same name and namespace in other branches
- 8 src/Event/ExternalAuthLoginEvent.php \Drupal\externalauth\Event\ExternalAuthLoginEvent
Notify event listeners about an externalauth user login.
Hierarchy
- class \Drupal\externalauth\Event\ExternalAuthLoginEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ExternalAuthLoginEvent
1 file declares its use of ExternalAuthLoginEvent
- ExternalAuth.php in src/
ExternalAuth.php
File
- src/
Event/ ExternalAuthLoginEvent.php, line 11
Namespace
Drupal\externalauth\EventView source
class ExternalAuthLoginEvent extends Event {
/**
* The Drupal user account.
*
* @var \Drupal\user\UserInterface
*/
protected $account;
/**
* The name of the service providing external authentication.
*
* @var string
*/
protected $provider;
/**
* The unique, external authentication name.
*
* This is provided by the authentication provider.
*
* @var string
*/
protected $authname;
/**
* Constructs an external login event object.
*
* @param \Drupal\user\UserInterface $account
* The Drupal user account.
* @param string $provider
* The name of the service providing external authentication.
* @param string $authname
* The unique, external authentication name provided by authentication
* provider.
*/
public function __construct(UserInterface $account, $provider, $authname) {
$this->account = $account;
$this->provider = $provider;
$this->authname = $authname;
}
/**
* Gets the Drupal user entity.
*
* @return \Drupal\user\UserInterface
* The Drupal user account.
*/
public function getAccount() {
return $this->account;
}
/**
* Gets the provider.
*
* @return string
* The name of the service providing external authentication.
*/
public function getProvider() {
return $this->provider;
}
/**
* Gets the authname.
*
* @return string
* The unique, external authentication name provided by authentication
* provider.
*/
public function getAuthname() {
return $this->authname;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExternalAuthLoginEvent:: |
protected | property | The Drupal user account. | |
ExternalAuthLoginEvent:: |
protected | property | The unique, external authentication name. | |
ExternalAuthLoginEvent:: |
protected | property | The name of the service providing external authentication. | |
ExternalAuthLoginEvent:: |
public | function | Gets the Drupal user entity. | |
ExternalAuthLoginEvent:: |
public | function | Gets the authname. | |
ExternalAuthLoginEvent:: |
public | function | Gets the provider. | |
ExternalAuthLoginEvent:: |
public | function | Constructs an external login event object. |