PHP 클래스 SimpleSAML_SessionHandlerPHP, simplesamlphp

This file defines a session handler which uses the default php session handler for storage.
저자: Olav Morken, UNINETT AS. ([email protected])
상속: extends SimpleSAML_SessionHandler
파일 보기 프로젝트 열기: simplesamlphp/simplesamlphp

보호된 프로퍼티들

프로퍼티 타입 설명
$cookie_name string This variable contains the session cookie name.

공개 메소드들

메소드 설명
getCookieParams ( ) : array Get the cookie parameters that should be used for session cookies.
getCookieSessionId ( ) : string | null Retrieve the session ID saved in the session cookie, if there's one.
getSessionCookieName ( ) : string Retrieve the session cookie name.
hasSessionCookie ( ) : boolean Check whether the session cookie is set.
loadSession ( string | null $sessionId = null ) : SimpleSAML_Session | null Load the session from the PHP session array.
newSessionId ( ) : string Create a new session id.
restorePrevious ( ) Restore a previously-existing session.
saveSession ( SimpleSAML_Session $session ) Save the current session to the PHP session array.
setCookie ( string $sessionName, string | null $sessionID, array $cookieParams = null ) Set a session cookie.

보호된 메소드들

메소드 설명
__construct ( ) Initialize the PHP session handling. This constructor is protected because it should only be called from SimpleSAML_SessionHandler::createSessionHandler(.

비공개 메소드들

메소드 설명
sessionStart ( ) This method starts a session, making sure no warnings are generated due to headers being already sent.

메소드 상세

__construct() 보호된 메소드

..).
protected __construct ( )

getCookieParams() 공개 메소드

This function contains some adjustments from the default to provide backwards-compatibility.
public getCookieParams ( ) : array
리턴 array The cookie parameters for our sessions.

getCookieSessionId() 공개 메소드

Retrieve the session ID saved in the session cookie, if there's one.
public getCookieSessionId ( ) : string | null
리턴 string | null The session id saved in the cookie or null if no session cookie was set.

getSessionCookieName() 공개 메소드

Retrieve the session cookie name.
public getSessionCookieName ( ) : string
리턴 string The session cookie name.

hasSessionCookie() 공개 메소드

This function will only return false if is is certain that the cookie isn't set.
public hasSessionCookie ( ) : boolean
리턴 boolean True if it was set, false otherwise.

loadSession() 공개 메소드

Load the session from the PHP session array.
public loadSession ( string | null $sessionId = null ) : SimpleSAML_Session | null
$sessionId string | null The ID of the session we should load, or null to use the default.
리턴 SimpleSAML_Session | null The session object, or null if it doesn't exist.

newSessionId() 공개 메소드

Create a new session id.
public newSessionId ( ) : string
리턴 string The new session id.

restorePrevious() 공개 메소드

Use this method to restore a previous PHP session existing before SimpleSAMLphp initialized its own session. WARNING: do not use this method directly, unless you know what you are doing. Calling this method directly, outside of SimpleSAML_Session, could cause SimpleSAMLphp's session to be lost or mess the application's one. The session must always be saved properly before calling this method. If you don't understand what this is about, don't use this method.
public restorePrevious ( )

saveSession() 공개 메소드

Save the current session to the PHP session array.
public saveSession ( SimpleSAML_Session $session )
$session SimpleSAML_Session The session object we should save.

setCookie() 공개 메소드

Set a session cookie.
public setCookie ( string $sessionName, string | null $sessionID, array $cookieParams = null )
$sessionName string The name of the session.
$sessionID string | null The session ID to use. Set to null to delete the cookie.
$cookieParams array Additional parameters to use for the session cookie.

프로퍼티 상세