Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
46f813e4
Commit
46f813e4
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Fix phpdoc comments in SimpleSAML_SessionHandlerPHP.
parent
7bd210d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/SessionHandlerPHP.php
+30
-17
30 additions, 17 deletions
lib/SimpleSAML/SessionHandlerPHP.php
with
30 additions
and
17 deletions
lib/SimpleSAML/SessionHandlerPHP.php
+
30
−
17
View file @
46f813e4
<?php
<?php
/**
/**
* This file is part of SimpleSAMLphp. See the file COPYING in the
* This file is part of SimpleSAMLphp. See the file COPYING in the root of the distribution for licence information.
* root of the distribution for licence information.
*
*
* This file defines a session handler which uses the default php
* This file defines a session handler which uses the default php session handler for storage.
* session handler for storage.
*
*
* @author Olav Morken, UNINETT AS. <andreas.solberg@uninett.no>
* @author Olav Morken, UNINETT AS. <andreas.solberg@uninett.no>
* @package
s
impleSAMLphp
* @package
S
impleSAMLphp
*/
*/
class
SimpleSAML_SessionHandlerPHP
extends
SimpleSAML_SessionHandler
{
class
SimpleSAML_SessionHandlerPHP
extends
SimpleSAML_SessionHandler
{
/* This variable contains the session cookie name. */
/**
* This variable contains the session cookie name.
*
* @var string
*/
protected
$cookie_name
;
protected
$cookie_name
;
/*
Initialize the PHP session handling. This constructor is protected
/*
*
* because it should only be called from
*
Initialize the PHP session handling. This constructor is protected
because it should only be called from
* SimpleSAML_SessionHandler::createSessionHandler(...).
* SimpleSAML_SessionHandler::createSessionHandler(...).
*/
*/
protected
function
__construct
()
{
protected
function
__construct
()
{
...
@@ -58,7 +60,10 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -58,7 +60,10 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
/**
/**
* Create and set new session id.
* Create and set new session id.
*
*
* @return string The new session id.
* @return string The new session id.
*
* @throws SimpleSAML_Error_Exception If the cookie is marked as secure but we are not using HTTPS, or the headers
* were already sent and therefore we cannot set the cookie.
*/
*/
public
function
newSessionId
()
{
public
function
newSessionId
()
{
$session_cookie_params
=
session_get_cookie_params
();
$session_cookie_params
=
session_get_cookie_params
();
...
@@ -90,7 +95,9 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -90,7 +95,9 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
/**
/**
* Retrieve the session id of saved in the session cookie.
* Retrieve the session id of saved in the session cookie.
*
*
* @return string The session id saved in the cookie.
* @return string The session id saved in the cookie.
*
* @throws SimpleSAML_Error_Exception If the cookie is marked as secure but we are not using HTTPS.
*/
*/
public
function
getCookieSessionId
()
{
public
function
getCookieSessionId
()
{
if
(
session_id
()
===
''
)
{
if
(
session_id
()
===
''
)
{
...
@@ -114,7 +121,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -114,7 +121,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
/**
/**
* Retrieve the session cookie name.
* Retrieve the session cookie name.
*
*
* @return string
The session cookie name.
* @return string The session cookie name.
*/
*/
public
function
getSessionCookieName
()
{
public
function
getSessionCookieName
()
{
...
@@ -125,7 +132,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -125,7 +132,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
/**
/**
* Save the current session to the PHP session array.
* Save the current session to the PHP session array.
*
*
* @param SimpleSAML_Session $session
The session object we should save.
* @param SimpleSAML_Session $session The session object we should save.
*/
*/
public
function
saveSession
(
SimpleSAML_Session
$session
)
{
public
function
saveSession
(
SimpleSAML_Session
$session
)
{
...
@@ -136,8 +143,11 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -136,8 +143,11 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
/**
/**
* Load the session from the PHP session array.
* Load the session from the PHP session array.
*
*
* @param string|NULL $sessionId The ID of the session we should load, or NULL to use the default.
* @param string|null $sessionId The ID of the session we should load, or NULL to use the default.
* @return SimpleSAML_Session|NULL The session object, or NULL if it doesn't exist.
* @return SimpleSAML_Session|null The session object, or NULL if it doesn't exist.
*
* @throws SimpleSAML_Error_Exception If it wasn't possible to disable session cookies or load a session with a
* specific identifier.
*/
*/
public
function
loadSession
(
$sessionId
=
NULL
)
{
public
function
loadSession
(
$sessionId
=
NULL
)
{
assert
(
'is_string($sessionId) || is_null($sessionId)'
);
assert
(
'is_string($sessionId) || is_null($sessionId)'
);
...
@@ -176,9 +186,9 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -176,9 +186,9 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
/**
/**
* Check whether the session cookie is set.
* Check whether the session cookie is set.
*
*
* This function will only return
FALSE
if is is certain that the cookie isn't set.
* This function will only return
false
if is is certain that the cookie isn't set.
*
*
* @return bool
TRUE
if it was set,
FALSE if not
.
* @return bool
ean True
if it was set,
false otherwise
.
*/
*/
public
function
hasSessionCookie
()
{
public
function
hasSessionCookie
()
{
...
@@ -191,8 +201,11 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
...
@@ -191,8 +201,11 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
*
*
* This function contains some adjustments from the default to provide backwards-compatibility.
* This function contains some adjustments from the default to provide backwards-compatibility.
*
*
* @return array
* @return array
The cookie parameters for our sessions.
* @link http://www.php.net/manual/en/function.session-get-cookie-params.php
* @link http://www.php.net/manual/en/function.session-get-cookie-params.php
*
* @throws SimpleSAML_Error_Exception If both 'session.phpsession.limitedpath' and 'session.cookie.path' options
* are set at the same time in the configuration.
*/
*/
public
function
getCookieParams
()
{
public
function
getCookieParams
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment