public function CasProxyHelper::storePgtSession in CAS 2.x
Same name and namespace in other branches
- 8 src/Service/CasProxyHelper.php \Drupal\cas\Service\CasProxyHelper::storePgtSession()
Store the PGT in the user session.
Parameters
string $pgt_iou: A pgtIou to identify the PGT.
File
- src/
Service/ CasProxyHelper.php, line 235
Class
- CasProxyHelper
- Default implementation of 'cas.proxy_helper' service.
Namespace
Drupal\cas\ServiceCode
public function storePgtSession($pgt_iou) {
$pgt = $this->connection
->select('cas_pgt_storage', 'c')
->fields('c', [
'pgt',
])
->condition('pgt_iou', $pgt_iou)
->execute()
->fetch()->pgt;
$this->session
->set('cas_pgt', $pgt);
// Now that we have the pgt in the session,
// we can delete the database mapping.
$this->connection
->delete('cas_pgt_storage')
->condition('pgt_iou', $pgt_iou)
->execute();
}