You are here

class CasPostValidateEvent in CAS 8

Same name and namespace in other branches
  1. 2.x src/Event/CasPostValidateEvent.php \Drupal\cas\Event\CasPostValidateEvent

Event fired after CAS validation happens.

CAS dispatches this event just after the ticket is validated by the CAS server and the CasPropertyBag object is created with relevant data from the response.

Subscribers of this event can parse the response from the CAS server and modify the CasPropertyBag.

Hierarchy

Expanded class hierarchy of CasPostValidateEvent

1 file declares its use of CasPostValidateEvent
CasValidator.php in src/Service/CasValidator.php

File

src/Event/CasPostValidateEvent.php, line 18

Namespace

Drupal\cas\Event
View source
class CasPostValidateEvent extends Event {

  /**
   * The raw validation response data from CAS server.
   *
   * @var string
   */
  protected $responseData;

  /**
   * The bag of properties extracted from the response after the validation.
   *
   * @var \Drupal\cas\CasPropertyBag
   */
  protected $casPropertyBag;

  /**
   * CasPostValidateEvent constructor.
   *
   * @param string $response_data
   *   The raw validation response data from CAS server.
   * @param \Drupal\cas\CasPropertyBag $cas_property_bag
   *   The bag of properties extracted from the response after the validation.
   */
  public function __construct($response_data, CasPropertyBag $cas_property_bag) {
    $this->responseData = $response_data;
    $this->casPropertyBag = $cas_property_bag;
  }

  /**
   * Returns the CasPropertyBag object.
   *
   * @return \Drupal\cas\CasPropertyBag
   *   The property bag
   */
  public function getCasPropertyBag() {
    return $this->casPropertyBag;
  }

  /**
   * Returns the responseData string.
   *
   * @return string
   *   The raw validation response data from CAS server.
   */
  public function getResponseData() {
    return $this->responseData;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CasPostValidateEvent::$casPropertyBag protected property The bag of properties extracted from the response after the validation.
CasPostValidateEvent::$responseData protected property The raw validation response data from CAS server.
CasPostValidateEvent::getCasPropertyBag public function Returns the CasPropertyBag object.
CasPostValidateEvent::getResponseData public function Returns the responseData string.
CasPostValidateEvent::__construct public function CasPostValidateEvent constructor.