PM4Py-WS Session Management

PM4Py-WS Session Management

This is responsible for the user authentication and for the verification of the validity of a given session. Moreover,

The session managers could be found inside the pm4pyws.user_iam package. The interface of session management could be found inside pm4pyws.user_iam.interface. The current versions implemented inside PM4Py-WS are:

  • Basic session handler
  • Keycloak session handler (not yet)

Methods that should be implemented by a session handler are:

do_login(user, password)

Parameters:

user => Username

password => Password

Returns:

If the authentication succeeds, then the session ID

If the authentication fails, then a None

 

check_session_validity(session_id)

Checks the validity of the current session

Parameters:

session_id => Session ID

Returns:

A boolean value (True if the session is valid)

 

get_user_from_session(session_id)

Gets the user ID corresponding to a given session

Parameters:

session_id => Session ID

Returns:

User ID associated to the session