summaryrefslogtreecommitdiffabout
path: root/include/opkele/basic_op.h
Unidiff
Diffstat (limited to 'include/opkele/basic_op.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/basic_op.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/opkele/basic_op.h b/include/opkele/basic_op.h
index a0f0af0..0e3231d 100644
--- a/include/opkele/basic_op.h
+++ b/include/opkele/basic_op.h
@@ -1,106 +1,109 @@
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
8namespace opkele { 8namespace opkele {
9 using std::string; 9 using std::string;
10 10
11 /**
12 * Implementation of basic OP functionality
13 */
11 class basic_OP { 14 class basic_OP {
12 public: 15 public:
13 /** 16 /**
14 * The request mode for the request being processed 17 * The request mode for the request being processed
15 */ 18 */
16 mode_t mode; 19 mode_t mode;
17 /** 20 /**
18 * association used in transaction. reset in case of dumb operation 21 * association used in transaction. reset in case of dumb operation
19 */ 22 */
20 assoc_t assoc; 23 assoc_t assoc;
21 /** 24 /**
22 * true if the request is openid2 request 25 * true if the request is openid2 request
23 */ 26 */
24 bool openid2; 27 bool openid2;
25 /** 28 /**
26 * The return_to RP endpoint 29 * The return_to RP endpoint
27 */ 30 */
28 string return_to; 31 string return_to;
29 /** 32 /**
30 * The realm we authenticate for 33 * The realm we authenticate for
31 */ 34 */
32 string realm; 35 string realm;
33 /** 36 /**
34 * Claimed identifier 37 * Claimed identifier
35 */ 38 */
36 string claimed_id; 39 string claimed_id;
37 /** 40 /**
38 * The OP-Local identifier 41 * The OP-Local identifier
39 */ 42 */
40 string identity; 43 string identity;
41 /** 44 /**
42 * The invalidate handle for the reply request 45 * The invalidate handle for the reply request
43 */ 46 */
44 string invalidate_handle; 47 string invalidate_handle;
45 48
46 void reset_vars(); 49 void reset_vars();
47 50
48 /** 51 /**
49 * @name Request information access 52 * @name Request information access
50 * Setting and retrieval of the information pertaining to the request being processed 53 * Setting and retrieval of the information pertaining to the request being processed
51 * @{ 54 * @{
52 */ 55 */
53 /** 56 /**
54 * Check if the RP expects us to get back to them. 57 * Check if the RP expects us to get back to them.
55 * @return true if RP supplied return_to URL 58 * @return true if RP supplied return_to URL
56 */ 59 */
57 bool has_return_to() const; 60 bool has_return_to() const;
58 /** 61 /**
59 * Find out where the RP is waiting for us. 62 * Find out where the RP is waiting for us.
60 * @return the return_to URL supplied 63 * @return the return_to URL supplied
61 * @throw no_return_to if no return_to is supplied with the request 64 * @throw no_return_to if no return_to is supplied with the request
62 */ 65 */
63 const string& get_return_to() const; 66 const string& get_return_to() const;
64 67
65 /** 68 /**
66 * Find out what realm we are authenticating user for 69 * Find out what realm we are authenticating user for
67 * @return the realm 70 * @return the realm
68 */ 71 */
69 const string& get_realm() const; 72 const string& get_realm() const;
70 73
71 /** 74 /**
72 * Check if request is about identity 75 * Check if request is about identity
73 * @return true if so 76 * @return true if so
74 */ 77 */
75 bool has_identity() const; 78 bool has_identity() const;
76 /** 79 /**
77 * Get claimed identifier supplied with the request 80 * Get claimed identifier supplied with the request
78 * @return claimed identifier 81 * @return claimed identifier
79 * @throw non_identity if request is not about identity 82 * @throw non_identity if request is not about identity
80 */ 83 */
81 const string& get_claimed_id() const; 84 const string& get_claimed_id() const;
82 /** 85 /**
83 * Get the identity (OP-Local identifier) being confirmed 86 * Get the identity (OP-Local identifier) being confirmed
84 * @return identity 87 * @return identity
85 * @throw non_identity if request is not about identity 88 * @throw non_identity if request is not about identity
86 */ 89 */
87 const string& get_identity() const; 90 const string& get_identity() const;
88 91
89 /** 92 /**
90 * Is identifier supposed to be selected on our side? 93 * Is identifier supposed to be selected on our side?
91 * @return true if identity is a special identifier select URI 94 * @return true if identity is a special identifier select URI
92 */ 95 */
93 bool is_id_select() const; 96 bool is_id_select() const;
94 97
95 /** 98 /**
96 * Select the identity for identifier select request 99 * Select the identity for identifier select request
97 * @param cid claimed identifier 100 * @param cid claimed identifier
98 * @param lid local identifier 101 * @param lid local identifier
99 */ 102 */
100 void select_identity(const string& cid,const string& lid); 103 void select_identity(const string& cid,const string& lid);
101 /** 104 /**
102 * Set claimed identifier (for instance if it's supposed to have 105 * Set claimed identifier (for instance if it's supposed to have
103 * fragment part) 106 * fragment part)
104 * @param cid claimed identifier 107 * @param cid claimed identifier
105 */ 108 */
106 void set_claimed_id(const string& cid); 109 void set_claimed_id(const string& cid);