summaryrefslogtreecommitdiffabout
path: root/include/opkele/prequeue_rp.h
Unidiff
Diffstat (limited to 'include/opkele/prequeue_rp.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/prequeue_rp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/opkele/prequeue_rp.h b/include/opkele/prequeue_rp.h
index 68fe03d..6f1fda9 100644
--- a/include/opkele/prequeue_rp.h
+++ b/include/opkele/prequeue_rp.h
@@ -1,88 +1,96 @@
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
9namespace opkele { 9namespace 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 /** 15 /**
16 * discovery-enabled RP implementation, prequeueing discovered endpoints 16 * discovery-enabled RP implementation, prequeueing discovered endpoints
17 */ 17 */
18 class prequeue_RP : public basic_RP { 18 class prequeue_RP : public basic_RP {
19 public: 19 public:
20 /** 20 /**
21 * @name Session persistent store API 21 * @name Session persistent store API
22 * @{ 22 * @{
23 */ 23 */
24 /** 24 /**
25 * Called before queueing discovered endpoints. Typically happens 25 * Called before queueing discovered endpoints. Typically happens
26 * while initiating authentication session. 26 * while initiating authentication session.
27 * @see queue_endpoint() 27 * @see queue_endpoint()
28 * @see end_queueing() 28 * @see end_queueing()
29 */ 29 */
30 virtual void begin_queueing() { } 30 virtual void begin_queueing() { }
31 /** 31 /**
32 * Used to queue discovered endpoint. It is implementors 32 * Used to queue discovered endpoint. It is implementors
33 * responsibility to store the endpoint wherever he choses to store 33 * responsibility to store the endpoint wherever he choses to store
34 * it. 34 * it.
35 * @param oep the endpoint to queue 35 * @param oep the endpoint to queue
36 * @see begin_queueing() 36 * @see begin_queueing()
37 * @see end_queueing() 37 * @see end_queueing()
38 */ 38 */
39 virtual void queue_endpoint(const openid_endpoint_t& oep) = 0; 39 virtual void queue_endpoint(const openid_endpoint_t& oep) = 0;
40 /** 40 /**
41 * Called after all discovered endpoints were queued. Implementor 41 * Called after all discovered endpoints were queued. Implementor
42 * may chose to use this virtual to commit endpoints queue to 42 * may chose to use this virtual to commit endpoints queue to
43 * persistent store. 43 * persistent store.
44 * @see begin_queueing() 44 * @see begin_queueing()
45 * @see queue_endpoint() 45 * @see queue_endpoint()
46 */ 46 */
47 virtual void end_queueing() { } 47 virtual void end_queueing() { }
48 48
49 /** 49 /**
50 * Used to store normalized id when initiating request. 50 * Used to store normalized id when initiating request.
51 * The default implementation does nothing, because implementor 51 * The default implementation does nothing, because implementor
52 * doesn't have to care. 52 * doesn't have to care.
53 * @param nid normalized id 53 * @param nid normalized id
54 * @see get_normalzied_id() 54 * @see get_normalzied_id()
55 */ 55 */
56 virtual void set_normalized_id(const string& nid); 56 virtual void set_normalized_id(const string& nid);
57 /** 57 /**
58 * Return the normalized id previously set by set_normalized_id(). 58 * Return the normalized id previously set by set_normalized_id().
59 * Provided for the sake of completeness because default 59 * Provided for the sake of completeness because default
60 * implementation doesn't use it. 60 * implementation doesn't use it.
61 * @return the normalized identity 61 * @return the normalized identity
62 */ 62 */
63 virtual const string get_normalized_id() const; 63 virtual const string get_normalized_id() const;
64 /** 64 /**
65 * @} 65 * @}
66 */ 66 */
67 67
68 /** 68 /**
69 * @name Actions 69 * @name Actions
70 * @{ 70 * @{
71 */ 71 */
72 /** 72 /**
73 * In addition to base class implementation it does endpoints 73 * In addition to base class implementation it does endpoints
74 * discovery and queueing 74 * discovery and queueing
75 * @param usi User-suppled identifier 75 * @param usi User-suppled identifier
76 */ 76 */
77 void initiate(const string& usi); 77 void initiate(const string& usi);
78 /** 78 /**
79 * @} 79 * @}
80 */ 80 */
81 81
82 void verify_OP(const string& OP, 82 void verify_OP(const string& OP,
83 const string& claimed_id,const string& identity) const; 83 const string& claimed_id,const string& identity) const;
84
85 /**
86 * Perform full discovery on identity
87 * @param it iterator used for feeding discovered endpoints back to caller
88 * @param id user supplied identity
89 * @returns normalized identity (canonical identifier can be found in endpoints)
90 */
91 virtual const string discover(openid_endpoint_output_iterator it,const string& id) const;
84 }; 92 };
85 93
86} 94}
87 95
88#endif /* __OPKELE_RP_H */ 96#endif /* __OPKELE_RP_H */