openmediavault  4.0 (Arrakis)
The open network attached storage solution
Public Member Functions | Static Public Member Functions | List of all members
OMV\Session Class Reference

Public Member Functions

 start ()
 
 commit ()
 
 destroy ()
 
 initialize ($username, $role)
 
 getRole ()
 
 isAuthenticated ()
 
 getUsername ()
 
 updateLastAccess ()
 
 isTimeout ()
 
 validateAuthentication ()
 
 validateTimeout ()
 
 validateUser ()
 
 validateIpAddress ()
 
 validateUserAgent ()
 
 validate ()
 
 dump ()
 

Static Public Member Functions

static & getInstance ()
 

Member Function Documentation

◆ commit()

OMV\Session::commit ( )

Write session data and end session.

◆ destroy()

OMV\Session::destroy ( )

Destroy session.

◆ dump()

OMV\Session::dump ( )

Dump the current session informations.

◆ getInstance()

static& OMV\Session::getInstance ( )
static

Returns the session singleton.

Returns
The session object.

◆ getRole()

OMV\Session::getRole ( )

Get the role of the user from this session.

Returns
Returns the user role, otherwise FALSE.

◆ getUsername()

OMV\Session::getUsername ( )

Get the name of the user from this session.

Returns
Returns the current user name, otherwise FALSE.

◆ initialize()

OMV\Session::initialize (   $username,
  $role 
)

Initialize the session.

Parameters
usernameThe user name.
roleThe user role.
Returns
The session id.

◆ isAuthenticated()

OMV\Session::isAuthenticated ( )

Is this session authenticated?

Returns
Returns TRUE if the session is authenticated, otherwise FALSE.

◆ isTimeout()

OMV\Session::isTimeout ( )

Check if the last access if not older than the defined timeout value.

Returns
TRUE if the session is timed out, otherwise FALSE.

◆ start()

OMV\Session::start ( )

Start session.

◆ updateLastAccess()

OMV\Session::updateLastAccess ( )

Update the time on which the last access took place.

◆ validate()

OMV\Session::validate ( )

Check if the session is valid. In case of an error the session is destroyed and an exception is thrown.

◆ validateAuthentication()

OMV\Session::validateAuthentication ( )

Validate the authentication. In case of an error the session is destroyed and an exception is thrown.

◆ validateIpAddress()

OMV\Session::validateIpAddress ( )

Validate the IP address. In case of an error the session is destroyed and an exception is thrown.

◆ validateTimeout()

OMV\Session::validateTimeout ( )

Validate the timeout. In case of an error the session is destroyed and an exception is thrown.

◆ validateUser()

OMV\Session::validateUser ( )

Validate the user. In case of an error the session is destroyed and an exception is thrown.

◆ validateUserAgent()

OMV\Session::validateUserAgent ( )

Validate the browser user agent. In case of an error the session is destroyed and an exception is thrown.


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