-rw-r--r-- | include/opkele/basic_op.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/opkele/basic_op.h b/include/opkele/basic_op.h index 0326508..12306dd 100644 --- a/include/opkele/basic_op.h +++ b/include/opkele/basic_op.h | |||
@@ -1,96 +1,98 @@ | |||
1 | #ifndef __OPKELE_BASIC_OP_H | 1 | #ifndef __OPKELE_BASIC_OP_H |
2 | #define __OPKELE_BASIC_OP_H | 2 | #define __OPKELE_BASIC_OP_H |
3 | 3 | ||
4 | #include <string> | 4 | #include <string> |
5 | #include <opkele/types.h> | 5 | #include <opkele/types.h> |
6 | #include <opkele/extension.h> | 6 | #include <opkele/extension.h> |
7 | 7 | ||
8 | namespace opkele { | 8 | namespace opkele { |
9 | using std::string; | 9 | using std::string; |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * Implementation of basic OP functionality | 12 | * Implementation of basic OP functionality |
13 | */ | 13 | */ |
14 | class basic_OP { | 14 | class basic_OP { |
15 | public: | 15 | public: |
16 | /** | 16 | /** |
17 | * The request mode for the request being processed | 17 | * The request mode for the request being processed |
18 | */ | 18 | */ |
19 | mode_t mode; | 19 | mode_t mode; |
20 | /** | 20 | /** |
21 | * association used in transaction. reset in case of dumb operation | 21 | * association used in transaction. reset in case of dumb operation |
22 | */ | 22 | */ |
23 | assoc_t assoc; | 23 | assoc_t assoc; |
24 | /** | 24 | /** |
25 | * true if the request is openid2 request | 25 | * true if the request is openid2 request |
26 | */ | 26 | */ |
27 | bool openid2; | 27 | bool openid2; |
28 | /** | 28 | /** |
29 | * The return_to RP endpoint | 29 | * The return_to RP endpoint |
30 | */ | 30 | */ |
31 | string return_to; | 31 | string return_to; |
32 | /** | 32 | /** |
33 | * The realm we authenticate for | 33 | * The realm we authenticate for |
34 | */ | 34 | */ |
35 | string realm; | 35 | string realm; |
36 | /** | 36 | /** |
37 | * Claimed identifier | 37 | * Claimed identifier |
38 | */ | 38 | */ |
39 | string claimed_id; | 39 | string claimed_id; |
40 | /** | 40 | /** |
41 | * The OP-Local identifier | 41 | * The OP-Local identifier |
42 | */ | 42 | */ |
43 | string identity; | 43 | string identity; |
44 | /** | 44 | /** |
45 | * The invalidate handle for the reply request | 45 | * The invalidate handle for the reply request |
46 | */ | 46 | */ |
47 | string invalidate_handle; | 47 | string invalidate_handle; |
48 | 48 | ||
49 | virtual ~basic_OP() { } | ||
50 | |||
49 | void reset_vars(); | 51 | void reset_vars(); |
50 | 52 | ||
51 | /** | 53 | /** |
52 | * @name Request information access | 54 | * @name Request information access |
53 | * Setting and retrieval of the information pertaining to the request being processed | 55 | * Setting and retrieval of the information pertaining to the request being processed |
54 | * @{ | 56 | * @{ |
55 | */ | 57 | */ |
56 | /** | 58 | /** |
57 | * Check if the RP expects us to get back to them. | 59 | * Check if the RP expects us to get back to them. |
58 | * @return true if RP supplied return_to URL | 60 | * @return true if RP supplied return_to URL |
59 | */ | 61 | */ |
60 | bool has_return_to() const; | 62 | bool has_return_to() const; |
61 | /** | 63 | /** |
62 | * Find out where the RP is waiting for us. | 64 | * Find out where the RP is waiting for us. |
63 | * @return the return_to URL supplied | 65 | * @return the return_to URL supplied |
64 | * @throw no_return_to if no return_to is supplied with the request | 66 | * @throw no_return_to if no return_to is supplied with the request |
65 | */ | 67 | */ |
66 | const string& get_return_to() const; | 68 | const string& get_return_to() const; |
67 | 69 | ||
68 | /** | 70 | /** |
69 | * Find out what realm we are authenticating user for | 71 | * Find out what realm we are authenticating user for |
70 | * @return the realm | 72 | * @return the realm |
71 | */ | 73 | */ |
72 | const string& get_realm() const; | 74 | const string& get_realm() const; |
73 | 75 | ||
74 | /** | 76 | /** |
75 | * Check if request is about identity | 77 | * Check if request is about identity |
76 | * @return true if so | 78 | * @return true if so |
77 | */ | 79 | */ |
78 | bool has_identity() const; | 80 | bool has_identity() const; |
79 | /** | 81 | /** |
80 | * Get claimed identifier supplied with the request | 82 | * Get claimed identifier supplied with the request |
81 | * @return claimed identifier | 83 | * @return claimed identifier |
82 | * @throw non_identity if request is not about identity | 84 | * @throw non_identity if request is not about identity |
83 | */ | 85 | */ |
84 | const string& get_claimed_id() const; | 86 | const string& get_claimed_id() const; |
85 | /** | 87 | /** |
86 | * Get the identity (OP-Local identifier) being confirmed | 88 | * Get the identity (OP-Local identifier) being confirmed |
87 | * @return identity | 89 | * @return identity |
88 | * @throw non_identity if request is not about identity | 90 | * @throw non_identity if request is not about identity |
89 | */ | 91 | */ |
90 | const string& get_identity() const; | 92 | const string& get_identity() const; |
91 | 93 | ||
92 | /** | 94 | /** |
93 | * Is identifier supposed to be selected on our side? | 95 | * Is identifier supposed to be selected on our side? |
94 | * @return true if identity is a special identifier select URI | 96 | * @return true if identity is a special identifier select URI |
95 | */ | 97 | */ |
96 | bool is_id_select() const; | 98 | bool is_id_select() const; |