You are here

private function CasLogout::lookupSessionIdByServiceTicket in CAS 8

Same name and namespace in other branches
  1. 2.x src/Service/CasLogout.php \Drupal\cas\Service\CasLogout::lookupSessionIdByServiceTicket()

Lookup Session ID by CAS service ticket.

@codeCoverageIgnore

Parameters

string $ticket: A service ticket value from CAS to lookup in the database.

Return value

string The session ID corresponding to the session ticket.

1 call to CasLogout::lookupSessionIdByServiceTicket()
CasLogout::handleSlo in src/Service/CasLogout.php
Handles a single-log-out request from a CAS server.

File

src/Service/CasLogout.php, line 151

Class

CasLogout
Class CasLogout.

Namespace

Drupal\cas\Service

Code

private function lookupSessionIdByServiceTicket($ticket) {
  $result = $this->connection
    ->select('cas_login_data', 'c')
    ->fields('c', [
    'plainsid',
  ])
    ->condition('ticket', $ticket)
    ->execute()
    ->fetch();
  if (!empty($result)) {
    return $result->plainsid;
  }
  else {
    return NULL;
  }
}