ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Authentication\Infrastructure\CookieSessionId Class Reference

Reads the submitted session id from the request cookies. More...

+ Inheritance diagram for ILIAS\Authentication\Infrastructure\CookieSessionId:
+ Collaboration diagram for ILIAS\Authentication\Infrastructure\CookieSessionId:

Public Member Functions

 __construct (private RequestWrapper $cookies, private Refinery $refinery)
 
 get ()
 
 get ()
 

Detailed Description

Reads the submitted session id from the request cookies.

Definition at line 30 of file CookieSessionId.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Authentication\Infrastructure\CookieSessionId::__construct ( private RequestWrapper  $cookies,
private Refinery  $refinery 
)

Definition at line 32 of file CookieSessionId.php.

35 {
36 }

Member Function Documentation

◆ get()

ILIAS\Authentication\Infrastructure\CookieSessionId::get ( )
Returns
string Empty if the client did not send a session id.

Implements ILIAS\Authentication\Domain\SubmittedSessionId.

Definition at line 38 of file CookieSessionId.php.

38 : string
39 {
40 return $this->cookies->retrieve(
41 (string) session_name(),
42 $this->refinery->byTrying([
43 $this->refinery->kindlyTo()->string(),
44 $this->refinery->always('')
45 ])
46 );
47 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: