mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-08 19:41:00 +00:00
http/server: success/failure message for /oauth
This commit is contained in:
parent
a5164da136
commit
b29f98f64f
@ -178,12 +178,17 @@ case "/static/":
|
||||
break;
|
||||
case "/oauth":
|
||||
object oauth;
|
||||
http_ok(version);
|
||||
//PT((">>> shm: %O\n", shared_memory("oauth_request_tokens")))
|
||||
if (query["oauth_verifier"] && (oauth = shared_memory("oauth_request_tokens")[query["oauth_token"]])) {
|
||||
//PT((">>> oauth: %O\n", oauth))
|
||||
oauth->verified(query["oauth_verifier"]);
|
||||
m_delete(shared_memory("oauth_request_tokens"), query["oauth_token"]);
|
||||
write("OAuth succeeded");
|
||||
} else {
|
||||
write("OAuth failed: token not found");
|
||||
}
|
||||
quit();
|
||||
return 1;
|
||||
}
|
||||
switch (file[1]) {
|
||||
|
@ -1,3 +1,8 @@
|
||||
/* twitter client
|
||||
*
|
||||
* - register @ http://twitter.com/apps
|
||||
* - then in local.h #define TWITTER_KEY & TWITTER_SECRET
|
||||
*/
|
||||
#include <net.h>
|
||||
|
||||
inherit NET_PATH "http/oauth";
|
||||
|
Loading…
Reference in New Issue
Block a user