Submodule box.session | Tarantool

Submodule box.session

The box.session submodule allows querying the session state, writing to a session-specific temporary Lua table, or sending out-of-band messages, or setting up triggers which will fire when a session starts or ends.

A session is an object associated with each client connection.

Below is a list of all box.session functions and members.

Name Use
box.session.id() Get the current session’s ID
box.session.exists() Check if a session exists
box.session.peer() Get the session peer’s host address and port
box.session.sync() Get the sync integer constant
box.session.user() Get the current user’s name
box.session.type() Get the connection type or cause of action
box.session.su() Change the current user
box.session.uid() Get the current user’s ID
box.session.euid() Get the current effective user’s ID
box.session.storage Table with session-specific names and values
box.session.on_connect() Define a connect trigger
box.session.on_disconnect() Define a disconnect trigger
box.session.on_auth() Define an authentication trigger
box.session.on_access_denied() Define a trigger to report restricted actions
box.session.push() Send an out-of-band message
Found what you were looking for?
Feedback