cfxdb.cookiestore

Submodules

Classes

Cookie

Persistent cookies, as used in WAMP-Cookie authentication by router and proxy workers.

CookieStoreSchema

Persistent cookie store.

Cookies

Persisted cookies table.

IndexCookiesByValue

Index: cookie_value -> cookie_oid

Package Contents

class Cookie(from_fbs=None)[source]

Bases: object

Persistent cookies, as used in WAMP-Cookie authentication by router and proxy workers.

__str__()[source]
_authenticated = None
_authenticated_authmethod = None
_authenticated_joined_at = None
_authenticated_on_node = None
_authenticated_on_worker = None
_authenticated_session = None
_authenticated_transport_info = None
_authextra = None
_authid = None
_authmethod = None
_authrealm = None
_authrole = None
_created = None
_from_fbs = None
_max_age = None
_name = None
_oid = None
_value = None
property authenticated: numpy.datetime64

Timestamp when the cookie was authenticated (if any). Epoch time in ns.

property authenticated_authmethod: str

The (original) WAMP authentication method, after which the client was authenticated before setting this cookie.

property authenticated_joined_at: numpy.datetime64

Timestamp when the original authenticating session was welcome by the router. Epoch time in ns.

property authenticated_on_node: uuid.UUID

The Crossbar.io node (within the management domain) the cookie was authenticated on (if any).

property authenticated_on_worker: str

The Crossbar.io worker (within the node) the cookie was authenticated on (if any).

property authenticated_session: int

The WAMP session ID of the original authenticating session.

property authenticated_transport_info: dict

The client transport information for the connection the cookie was authenticated in (if any).

property authextra: dict

The WAMP authentication extra data to be returned to the client performing cookie-based authentication.

property authid: str

The WAMP authid a cookie-authenticating session is to be assigned.

property authmethod: str

The WAMP authmethod a cookie-authenticating session is to join under.

property authrealm: str

The WAMP realm a cookie-authenticating session is to join.

property authrole: str

The WAMP authrole a cookie-authenticating session is to join under.

build(builder)[source]
static cast(buf) Cookie[source]
property created: numpy.datetime64

Timestamp when the cookie was created. Epoch time in ns.

marshal() dict[source]
property max_age: int

//tools.ietf.org/html/rfc6265#page-20), e.g. 604800".

Type:

Cookie maximum age (lifetime of the cookie in seconds, see http

property name: str

Cookie name, as set in HTTP header, e.g. "cbtid".

property oid: uuid.UUID

Database ID of this cookie record.

property value: str

Cookie value, as set in HTTP header, e.g. "gn2ri8fuAYQse50/L6N7jnt2".

class CookieStoreSchema(db)[source]

Bases: object

Persistent cookie store.

static attach(db: zlmdb.Database) CookieStoreSchema[source]

Factory to create a schema from attaching to a database. The schema tables will be automatically mapped as persistent maps and attached to the database slots.

cookies: cfxdb.cookiestore._cookie.Cookies

Cookies persisted in this cookie store.

db
idx_cookies_by_value: cfxdb.cookiestore._cookie.IndexCookiesByValue

Index of cookies by cookie value.

class Cookies(slot=None, compress=None, build=None, cast=None)[source]

Bases: zlmdb.MapUuidFlatBuffers

Persisted cookies table.

Map zlmdb.MapUuidFlatBuffers from cookie_oid to cfxdb.cookiestore.Cookie

class IndexCookiesByValue(slot=None, compress=None)[source]

Bases: zlmdb.MapStringUuid

Index: cookie_value -> cookie_oid