-rw-r--r-- | include/opkele/prequeue_rp.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/opkele/prequeue_rp.h b/include/opkele/prequeue_rp.h index b98dd5a..68fe03d 100644 --- a/include/opkele/prequeue_rp.h +++ b/include/opkele/prequeue_rp.h | |||
@@ -1,81 +1,88 @@ | |||
1 | #ifndef __OPKELE_RP_H | 1 | #ifndef __OPKELE_RP_H |
2 | #define __OPKELE_RP_H | 2 | #define __OPKELE_RP_H |
3 | 3 | ||
4 | #include <string> | 4 | #include <string> |
5 | #include <set> | 5 | #include <set> |
6 | #include <iterator> | 6 | #include <iterator> |
7 | #include <opkele/basic_rp.h> | 7 | #include <opkele/basic_rp.h> |
8 | 8 | ||
9 | namespace opkele { | 9 | namespace opkele { |
10 | using std::string; | 10 | using std::string; |
11 | using std::set; | 11 | using std::set; |
12 | using std::iterator; | 12 | using std::iterator; |
13 | using std::output_iterator_tag; | 13 | using std::output_iterator_tag; |
14 | 14 | ||
15 | /** | ||
16 | * discovery-enabled RP implementation, prequeueing discovered endpoints | ||
17 | */ | ||
15 | class prequeue_RP : public basic_RP { | 18 | class prequeue_RP : public basic_RP { |
16 | public: | 19 | public: |
17 | /** | 20 | /** |
18 | * @name Session persistent store API | 21 | * @name Session persistent store API |
19 | * @{ | 22 | * @{ |
20 | */ | 23 | */ |
21 | /** | 24 | /** |
22 | * Called before queueing discovered endpoints. Typically happens | 25 | * Called before queueing discovered endpoints. Typically happens |
23 | * while initiating authentication session. | 26 | * while initiating authentication session. |
24 | * @see queue_endpoint() | 27 | * @see queue_endpoint() |
25 | * @see end_queueing() | 28 | * @see end_queueing() |
26 | */ | 29 | */ |
27 | virtual void begin_queueing() { } | 30 | virtual void begin_queueing() { } |
28 | /** | 31 | /** |
29 | * Used to queue discovered endpoint. It is implementors | 32 | * Used to queue discovered endpoint. It is implementors |
30 | * responsibility to store the endpoint wherever he choses to store | 33 | * responsibility to store the endpoint wherever he choses to store |
31 | * it. | 34 | * it. |
32 | * @param oep the endpoint to queue | 35 | * @param oep the endpoint to queue |
33 | * @see begin_queueing() | 36 | * @see begin_queueing() |
34 | * @see end_queueing() | 37 | * @see end_queueing() |
35 | */ | 38 | */ |
36 | virtual void queue_endpoint(const openid_endpoint_t& oep) = 0; | 39 | virtual void queue_endpoint(const openid_endpoint_t& oep) = 0; |
37 | /** | 40 | /** |
38 | * Called after all discovered endpoints were queued. Implementor | 41 | * Called after all discovered endpoints were queued. Implementor |
39 | * may chose to use this virtual to commit endpoints queue to | 42 | * may chose to use this virtual to commit endpoints queue to |
40 | * persistent store. | 43 | * persistent store. |
41 | * @see begin_queueing() | 44 | * @see begin_queueing() |
42 | * @see queue_endpoint() | 45 | * @see queue_endpoint() |
43 | */ | 46 | */ |
44 | virtual void end_queueing() { } | 47 | virtual void end_queueing() { } |
45 | 48 | ||
46 | /** | 49 | /** |
47 | * Used to store normalized id when initiating request. | 50 | * Used to store normalized id when initiating request. |
48 | * The default implementation does nothing, because implementor | 51 | * The default implementation does nothing, because implementor |
49 | * doesn't have to care. | 52 | * doesn't have to care. |
50 | * @param nid normalized id | 53 | * @param nid normalized id |
51 | * @see get_normalzied_id() | 54 | * @see get_normalzied_id() |
52 | */ | 55 | */ |
53 | virtual void set_normalized_id(const string& nid); | 56 | virtual void set_normalized_id(const string& nid); |
54 | /** | 57 | /** |
55 | * Return the normalized id previously set by set_normalized_id(). | 58 | * Return the normalized id previously set by set_normalized_id(). |
56 | * Provided for the sake of completeness because default | 59 | * Provided for the sake of completeness because default |
57 | * implementation doesn't use it. | 60 | * implementation doesn't use it. |
58 | * @return the normalized identity | 61 | * @return the normalized identity |
59 | */ | 62 | */ |
60 | virtual const string get_normalized_id() const; | 63 | virtual const string get_normalized_id() const; |
61 | /** | 64 | /** |
62 | * @} | 65 | * @} |
63 | */ | 66 | */ |
64 | 67 | ||
65 | /** | 68 | /** |
66 | * @name Actions | 69 | * @name Actions |
67 | * @{ | 70 | * @{ |
68 | */ | 71 | */ |
72 | /** | ||
73 | * In addition to base class implementation it does endpoints | ||
74 | * discovery and queueing | ||
75 | * @param usi User-suppled identifier | ||
76 | */ | ||
69 | void initiate(const string& usi); | 77 | void initiate(const string& usi); |
70 | |||
71 | /** | 78 | /** |
72 | * @} | 79 | * @} |
73 | */ | 80 | */ |
74 | 81 | ||
75 | void verify_OP(const string& OP, | 82 | void verify_OP(const string& OP, |
76 | const string& claimed_id,const string& identity) const; | 83 | const string& claimed_id,const string& identity) const; |
77 | }; | 84 | }; |
78 | 85 | ||
79 | } | 86 | } |
80 | 87 | ||
81 | #endif /* __OPKELE_RP_H */ | 88 | #endif /* __OPKELE_RP_H */ |