5.6.6.4. vlcp.service.utils.session

Note

This document is generated from the source file.

View Source on GitHub

Created on 2015/11/9

author:hubo
class vlcp.service.utils.session.Session(server)

HTTP Session with cookies

__init__(server)

Constructor

create()

Create a new session object

Returns:Session handle for the created session object.
destroy(sessionid)

Destroy a session

Parameters:sessionid – session ID
Returns:a list of Set-Cookie headers to be sent to the client
get(sessionid, refresh=True)

Get the seesion object of the session id

Parameters:
  • sessionid – a session ID
  • refresh – if True, refresh the expiration time of this session
Returns:

Session object or None if not exists

start(cookies, cookieopts=None)

Session start operation. First check among the cookies to find existed sessions; if there is not an existed session, create a new one.

Parameters:
  • cookies – cookie header from the client
  • cookieopts – extra options used when creating a new cookie
Returns:

(session_handle, cookies) where session_handle is a SessionHandle object, and cookies is a list of created Set-Cookie headers (may be empty)