aboutsummaryrefslogtreecommitdiffstats
path: root/mod/magic.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-21 15:39:05 -0800
committerfriendica <info@friendica.com>2013-01-21 15:39:05 -0800
commitdebf7f5f2691bab3c3b9c6ddd4fa3135f3d4aea2 (patch)
tree0ca979bd5a84b2b64831e3627beaee925b6e20d0 /mod/magic.php
parent6766f7f829923209e5ef4fda1452ed0b2ce0f09d (diff)
downloadvolse-hubzilla-debf7f5f2691bab3c3b9c6ddd4fa3135f3d4aea2.tar.gz
volse-hubzilla-debf7f5f2691bab3c3b9c6ddd4fa3135f3d4aea2.tar.bz2
volse-hubzilla-debf7f5f2691bab3c3b9c6ddd4fa3135f3d4aea2.zip
more work on magic auth
Diffstat (limited to 'mod/magic.php')
-rw-r--r--mod/magic.php6
1 files changed, 5 insertions, 1 deletions
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')",