more work on magic auth
This commit is contained in:
parent
6766f7f829
commit
debf7f5f26
@ -101,6 +101,12 @@ 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;
|
||||
|
@ -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')",
|
||||
|
@ -165,6 +165,12 @@ function post_post(&$a) {
|
||||
|
||||
}
|
||||
|
||||
if($msgtype === 'auth') {
|
||||
logger('mod_post: auth: ' . print_r($data,true));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2013-01-20.206
|
||||
2013-01-21.207
|
||||
|
@ -3584,6 +3584,7 @@ nav .nav-menu {
|
||||
nav .nav-menu.selected {
|
||||
border-bottom: 4px solid #CCCCCC;
|
||||
}
|
||||
|
||||
nav .nav-notify {
|
||||
background-color: #0d0;
|
||||
color: #fff;
|
||||
|
Reference in New Issue
Block a user