You are here

final class SamlauthEvents in SAML Authentication 8.2

Same name and namespace in other branches
  1. 8.3 src/Event/SamlauthEvents.php \Drupal\samlauth\Event\SamlauthEvents
  2. 4.x src/Event/SamlauthEvents.php \Drupal\samlauth\Event\SamlauthEvents

Defines events for the samlauth module.

Hierarchy

Expanded class hierarchy of SamlauthEvents

See also

\Drupal\samlauth\Event\SamlauthUserSyncEvent

2 files declare their use of SamlauthEvents
SamlService.php in src/SamlService.php
UserSyncEventSubscriber.php in src/EventSubscriber/UserSyncEventSubscriber.php

File

src/Event/SamlauthEvents.php, line 10

Namespace

Drupal\samlauth\Event
View source
final class SamlauthEvents {

  /**
   * Name of the event fired when searching for a user to match SAML attributes.
   *
   * The event allows modules to link existing user accounts to an authname
   * through the externalauth mechanism (see externalauth module). It is only
   * fired when no account is already linked and when no existing account can
   * be found according to the module settings for basic required properties
   * (username, email). The event listener method receives a
   * Drupal\samlauth\Event\SamlAuthUserLinkEvent instance. If it finds an
   * account to link, it should call the event's linkAccount() method.
   *
   * @Event
   *
   * @see \Drupal\samlauth\Event\SamlAuthUserLinkEvent
   *
   * @var string
   */
  const USER_LINK = 'samlauth.user_link';

  /**
   * Name of the event fired when a user is synchronized from SAML attributes.
   *
   * The event allows modules to synchronize user account values with SAML
   * attributes passed by the IdP in the authentication response. Basic required
   * properties (username, email) are already synchronized. The event listener
   * method receives a \Drupal\samlauth\Event\SamlauthUserSyncEvent instance. If
   * it changes the account, it should call the event's markAccountChanged()
   * method rather than saving the account by itself.
   *
   * The event is fired after the SP / samlauth library validates the IdP's
   * authentication response but before the Drupal user is logged in. An event
   * subscriber may throw an exception to prevent the login.
   *
   * @Event
   *
   * @see \Drupal\samlauth\Event\SamlauthUserSyncEvent
   *
   * @var string
   */
  const USER_SYNC = 'samlauth.user_sync';

}

Members

Namesort descending Modifiers Type Description Overrides
SamlauthEvents::USER_LINK constant Name of the event fired when searching for a user to match SAML attributes.
SamlauthEvents::USER_SYNC constant Name of the event fired when a user is synchronized from SAML attributes.