aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-21 19:16:21 -0800
committerfriendica <info@friendica.com>2013-01-21 19:16:21 -0800
commit5949607d17bceb51d61c73b5c0dbc0fcc063bd04 (patch)
treec3c59d435e146bd46a27d4503fc9b33878664b3f /include/zot.php
parent6421c09cff6bebd9c7f191d36239a8c4efe74bdf (diff)
downloadvolse-hubzilla-5949607d17bceb51d61c73b5c0dbc0fcc063bd04.tar.gz
volse-hubzilla-5949607d17bceb51d61c73b5c0dbc0fcc063bd04.tar.bz2
volse-hubzilla-5949607d17bceb51d61c73b5c0dbc0fcc063bd04.zip
magic auth - it's mostly done or at least all the code bits are written and it looks in theory to be pretty secure and it doesn't white screen. Getting it to actually work(?), well we won't know how hard that will be until we get it on a couple of systems and try it. Magic auth on one box is a no-op because you're already authenticated.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/zot.php b/include/zot.php
index fc1241ff2..38bac5e93 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -101,18 +101,13 @@ function zot_build_packet($channel,$type = 'notify',$recipients = null, $remote_
'version' => ZOT_REVISION
);
- // These fields are present when using magic auth
-
- if(array_key_exists('token',$channel)) {
- $data['sender']['token'] = $channel['token'];
- $data['sender']['token_sig'] = $channel['token_sig'];
- }
-
if($recipients)
$data['recipients'] = $recipients;
- if($secret)
+ if($secret) {
$data['secret'] = $secret;
+ $data['secret_sig'] = base64url_encode(rsa_sign($secret,$channel['channel_prvkey']));
+ }
logger('zot_build_packet: ' . print_r($data,true));