|
@@ -0,0 +1,19 @@
|
|
1
|
+# -*- coding: utf-8 -*-
|
|
2
|
+from lodel.plugin import LodelHook
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+## @brief checks if a session is valid or not, given its id
|
|
6
|
+# @param session_id str
|
|
7
|
+# @return bool
|
|
8
|
+@LodelHook('lodel2.check_session')
|
|
9
|
+def check_session(session_id):
|
|
10
|
+ return True
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+## @brief gets the session data corresponding to a session id
|
|
14
|
+# @param session_id str
|
|
15
|
+# @return dict|None : returns a dict containing the session data if a session is active/valid, None if not
|
|
16
|
+def get_session(session_id):
|
|
17
|
+ is_valid = LodelHook.call_hook('lodel2.check_session')
|
|
18
|
+ session_data = dict()
|
|
19
|
+ return session_data
|