File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
- """
2
- Holds methods for sending internal data through the satosa proxy
3
- """
4
1
from .exception import SATOSAError
5
2
6
3
@@ -11,6 +8,9 @@ class SATOSABadContextError(SATOSAError):
11
8
pass
12
9
13
10
11
+ """
12
+ Holds methods for sending internal data through the satosa proxy
13
+ """
14
14
class Context (object ):
15
15
"""
16
16
Holds information about the current request.
@@ -60,3 +60,19 @@ def path(self, p):
60
60
elif p .startswith ('/' ):
61
61
raise ValueError ("path can't start with '/'" )
62
62
self ._path = p
63
+
64
+ def decorate (self , key , value ):
65
+ """
66
+ Add information to the context
67
+ """
68
+
69
+ self .internal_data [key ] = value
70
+ return self
71
+
72
+ def get_decoration (self , key ):
73
+ """
74
+ Retrieve information from the context
75
+ """
76
+
77
+ value = self .internal_data .get (key )
78
+ return value
You can’t perform that action at this time.
0 commit comments