author | Michael Krelin <hacker@klever.net> | 2009-12-22 21:40:18 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2009-12-22 21:40:18 (UTC) |
commit | 282e937cefbca9ebb564e83e79f5e5b136ec960d (patch) (side-by-side diff) | |
tree | 31c2ae20899825157b90216f1e1c71ee1c7e1122 /include | |
parent | 142ca30cad85769067419a9ed5b60501af67e17c (diff) | |
download | libopkele-282e937cefbca9ebb564e83e79f5e5b136ec960d.zip libopkele-282e937cefbca9ebb564e83e79f5e5b136ec960d.tar.gz libopkele-282e937cefbca9ebb564e83e79f5e5b136ec960d.tar.bz2 |
minor cleanup of ax/oauth code
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/ax.h | 6 | ||||
-rw-r--r-- | include/opkele/oauth_ext.h | 9 |
2 files changed, 3 insertions, 12 deletions
diff --git a/include/opkele/ax.h b/include/opkele/ax.h index 996d756..ba629c1 100644 --- a/include/opkele/ax.h +++ b/include/opkele/ax.h @@ -1,31 +1,31 @@ #ifndef __OPKELE_AX_H #define __OPKELE_AX_H /** * @file * @brief Attribute Exchange extension */ #include <opkele/extension.h> namespace opkele { /** - * OpenID simple registration extension implementation - * http://openid.net/specs/openid-simple-registration-extension-1_0.html + * OpenID attribute exchange extension implementation + * http://openid.net/specs/openid-attribute-exchange-1_0.html */ class ax_t : public extension_t { public: /** special "count" value for add_attribute to request fetching "as many values as possible". */ static const int UNLIMITED_COUNT = -1; /** * Optional URL for receiving future attribute updates. * Set it before checkid_setup to send up the URL; read it after id_res to get it back. */ std::string update_url; /** * Consumer constructor. */ ax_t() : alias_count(0) { } @@ -67,18 +67,18 @@ namespace opkele { protected: /** Stores attributes to request fetching during checkid_setup. */ struct ax_attr_t { std::string uri; std::string alias; bool required; int count; }; std::vector<ax_attr_t> attrs; unsigned int alias_count; // auto-incr counter for auto-named aliases /** Stores results from fetch response during id_res. */ std::map<std::string, std::vector<std::string> > response_attrs; }; } -#endif /* __OPKELE_SREG_H */ +#endif /* __OPKELE_AX_H */ diff --git a/include/opkele/oauth_ext.h b/include/opkele/oauth_ext.h index 37a826b..657defa 100644 --- a/include/opkele/oauth_ext.h +++ b/include/opkele/oauth_ext.h @@ -5,41 +5,32 @@ * @file * @brief OAuth extension */ #include <opkele/extension.h> namespace opkele { /** * OpenID OAuth extension * http://step2.googlecode.com/svn/spec/openid_oauth_extension/latest/openid_oauth_extension.html */ class oauth_ext_t : public extension_t { public: std::string m_consumer, m_scope, m_request_token; - /** - * Consumer constructor. - * @param fr required fields - * @see fields_required - * @param fo optional fields - * @see fields_optional - * @param pu policy url - * @see policy_url - */ oauth_ext_t(const char *consumer = "", const char *scope = "") : m_consumer(consumer), m_scope(scope) { } virtual void rp_checkid_hook(basic_openid_message& om); virtual void rp_id_res_hook(const basic_openid_message& om, const basic_openid_message& sp); virtual void op_checkid_hook(const basic_openid_message& inm); virtual void op_id_res_hook(basic_openid_message& oum); virtual void checkid_hook(basic_openid_message& om); virtual void id_res_hook(const basic_openid_message& om, const basic_openid_message& sp); virtual void checkid_hook(const basic_openid_message& inm, basic_openid_message& oum); /** * Function called after parsing sreg request to set up response |