From debf7f5f2691bab3c3b9c6ddd4fa3135f3d4aea2 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 21 Jan 2013 15:39:05 -0800 Subject: more work on magic auth --- mod/magic.php | 6 +++++- mod/post.php | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/magic.php b/mod/magic.php index b74130005..3ae54bea0 100644 --- a/mod/magic.php +++ b/mod/magic.php @@ -53,9 +53,13 @@ function magic_init(&$a) { } $token = random_string(); - + $token_sig = rsa_sign($token,$channel['channel_prvkey']); + $recip = array(array('guid' => $x[0]['hubloc_guid'],'guid_sig' => $x[0]['hubloc_guid_sig'])); $channel = $a->get_channel(); + $channel['token'] = $token; + $channel['token_sig'] = $token_sig; + $hash = random_string(); $r = q("insert into verify ( type, channel, token, meta, created) values ('%s','%d','%s','%s','%s')", diff --git a/mod/post.php b/mod/post.php index 53180e1c1..ee21f2ffb 100644 --- a/mod/post.php +++ b/mod/post.php @@ -165,6 +165,12 @@ function post_post(&$a) { } + if($msgtype === 'auth') { + logger('mod_post: auth: ' . print_r($data,true)); + + + } + } -- cgit v1.2.3