nvflare.fuel.hci.server.sess module

class Session[source]

Bases: object

Object keeping track of an admin client session with token and time data.

mark_active()[source]
class SessionManager(idle_timeout=3600, monitor_interval=5)[source]

Bases: CommandModule

Session manager.

Parameters:
  • idle_timeout – session idle timeout

  • monitor_interval – interval for obtaining updates when monitoring

create_session(user_name, user_org, user_role)[source]

Creates new session with a new session token.

Parameters:
  • user_name – user name for session

  • user_org – org of the user

  • user_role – user’s role

Returns: Session

end_session(token)[source]
get_session(token: str)[source]
get_sessions()[source]
get_spec()[source]
handle_check_session(conn: Connection, args: List[str])[source]
handle_list_sessions(conn: Connection, args: List[str])[source]

Lists sessions and the details in a table.

Registered in the FedAdminServer with cmd_reg.register_module(sess_mgr).

monitor_sessions()[source]

Runs loop in a thread to end sessions that time out.

shutdown()[source]