class SamlauthUserLinkEvent in SAML Authentication 8.2
Same name and namespace in other branches
- 8.3 src/Event/SamlauthUserLinkEvent.php \Drupal\samlauth\Event\SamlauthUserLinkEvent
- 4.x src/Event/SamlauthUserLinkEvent.php \Drupal\samlauth\Event\SamlauthUserLinkEvent
Wraps a samlauth user sync event for event listeners.
Hierarchy
- class \Drupal\samlauth\Event\SamlauthUserLinkEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of SamlauthUserLinkEvent
1 file declares its use of SamlauthUserLinkEvent
- SamlService.php in src/
SamlService.php
File
- src/
Event/ SamlauthUserLinkEvent.php, line 11
Namespace
Drupal\samlauth\EventView source
class SamlauthUserLinkEvent extends Event {
/**
* The Drupal user account to link.
*
* @var \Drupal\user\UserInterface
*/
protected $account;
/**
* The SAML attributes received from the IDP.
*
* Single values are typically represented as one-element arrays.
*
* @var array
*/
protected $attributes;
/**
* Constructs a samlouth user link event object.
*
* @param array $attributes
* The SAML attributes received from the IDP.
*/
public function __construct(array $attributes) {
$this->attributes = $attributes;
}
/**
* Gets the Drupal user account to link.
*
* @return \Drupal\user\UserInterface $account
* The Drupal user account.
*/
public function getLinkedAccount() {
return $this->account;
}
/**
* Sets the Drupal user account to link.
*
* @param \Drupal\user\UserInterface $account
* The Drupal user account.
*/
public function setLinkedAccount(UserInterface $account) {
$this->account = $account;
}
/**
* Gets the SAML attributes.
*
* @return array
* The SAML attributes received from the IDP.
*/
public function getAttributes() {
return $this->attributes;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SamlauthUserLinkEvent:: |
protected | property | The Drupal user account to link. | |
SamlauthUserLinkEvent:: |
protected | property | The SAML attributes received from the IDP. | |
SamlauthUserLinkEvent:: |
public | function | Gets the SAML attributes. | |
SamlauthUserLinkEvent:: |
public | function | Gets the Drupal user account to link. | |
SamlauthUserLinkEvent:: |
public | function | Sets the Drupal user account to link. | |
SamlauthUserLinkEvent:: |
public | function | Constructs a samlouth user link event object. |