summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2008-02-08 21:26:55 (UTC)
committer Michael Krelin <hacker@klever.net>2008-02-08 21:26:55 (UTC)
commit1a4d8acd92d17ec1363886383bd171eabef2e25e (patch) (side-by-side diff)
tree7c330603957c5f6eff2bfeaa9155ff5ccb701e82
parent2e93c9940944edab87c29a2a13d60090f15fea86 (diff)
downloadlibopkele-1a4d8acd92d17ec1363886383bd171eabef2e25e.zip
libopkele-1a4d8acd92d17ec1363886383bd171eabef2e25e.tar.gz
libopkele-1a4d8acd92d17ec1363886383bd171eabef2e25e.tar.bz2
renamed verify_op to verify_OP
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/basic_op.h2
-rw-r--r--include/opkele/verify_op.h2
-rw-r--r--lib/verify_op.cc2
-rw-r--r--test/OP.cc2
4 files changed, 4 insertions, 4 deletions
diff --git a/include/opkele/basic_op.h b/include/opkele/basic_op.h
index 0e3231d..0326508 100644
--- a/include/opkele/basic_op.h
+++ b/include/opkele/basic_op.h
@@ -173,25 +173,25 @@ namespace opkele {
*/
basic_openid_message& check_authentication(
basic_openid_message& oum,const basic_openid_message& inm);
/**
* @}
*/
/**
* Verify return_to url. The default implementation checks whether
* return_to URI matches the realm
* @throw bad_realm in case of invalid realm
* @throw bad_return_to if return_to doesn't match the realm
- * @see verify_op::verify_return_to()
+ * @see verify_OP::verify_return_to()
*/
virtual void verify_return_to();
/**
* @name Global persistent store API
* These functions are related to the associations with RPs storage
* and retrieval and nonce management.
* @{
*/
/**
* Allocate association.
* @param type association type
diff --git a/include/opkele/verify_op.h b/include/opkele/verify_op.h
index 6b94240..9e29bac 100644
--- a/include/opkele/verify_op.h
+++ b/include/opkele/verify_op.h
@@ -1,23 +1,23 @@
#ifndef __OPKELE_VERIFY_OP_H
#define __OPKELE_VERIFY_OP_H
#include <opkele/basic_op.h>
namespace opkele {
/**
* The OP implementation that does discovery verification on RP
*/
- class verify_op : public basic_OP {
+ class verify_OP : public basic_OP {
public:
/**
* In addition to basic_OP::verify_return_to() functionality this
* implementation does the discovery on RP to see if return_to matches
* the realm
* @throw bad_return_to in case we fail to discover corresponding
* service endpoint
*/
void verify_return_to();
};
diff --git a/lib/verify_op.cc b/lib/verify_op.cc
index 0beca2d..ab21b4f 100644
--- a/lib/verify_op.cc
+++ b/lib/verify_op.cc
@@ -23,25 +23,25 @@ namespace opkele {
RP_verifier& operator*() { return *this; }
RP_verifier& operator=(const openid_endpoint_t& oep) {
if(util::uri_matches_realm(return_to,oep.uri))
throw __RP_verifier_good_input(OPKELE_CP_ "Found matching realm");
return *this;
}
RP_verifier& operator++() { ++seen; return *this; }
RP_verifier& operator++(int) { +seen; return *this; }
};
- void verify_op::verify_return_to() {
+ void verify_OP::verify_return_to() {
basic_OP::verify_return_to();
try {
RP_verifier rpv(return_to);
string drealm = realm;
string::size_type csss = drealm.find("://*.");
if(csss==4 || csss==5)
drealm.replace(csss+3,1,"www");
const char *rtt[] = { STURI_OPENID20_RT, 0 };
yadiscover(rpv,drealm,rtt,false);
if(rpv.seen)
throw bad_return_to(OPKELE_CP_ "return_to URL doesn't match any found while doing discovery on RP");
}catch(__RP_verifier_good_input&) {
diff --git a/test/OP.cc b/test/OP.cc
index ce54d92..851d831 100644
--- a/test/OP.cc
+++ b/test/OP.cc
@@ -43,25 +43,25 @@ class opdb_t : public sqlite3_t {
if(sqlite3_get_table(
_D, "SELECT a_op FROM assoc LIMIT 0",
&resp,&nr,&nc,&errm)!=SQLITE_OK) {
extern const char *__OP_db_bootstrap;
DOUT_("Bootstrapping DB");
if(sqlite3_exec(_D,__OP_db_bootstrap,NULL,NULL,&errm)!=SQLITE_OK)
throw opkele::exception(OPKELE_CP_ string("Failed to boostrap SQLite database: ")+errm);
}else
sqlite3_free_table(resp);
}
};
-class example_op_t : public opkele::verify_op {
+class example_op_t : public opkele::verify_OP {
public:
kingate::cgi_gateway& gw;
opdb_t db;
kingate::cookie htc;
example_op_t(kingate::cgi_gateway& gw)
: gw(gw) {
try {
htc = gw.cookies.get_cookie("htop_session");
sqlite3_mem_t<char*> S = sqlite3_mprintf(
"SELECT 1 FROM ht_sessions WHERE hts_id=%Q",