encrypt the owa token

This commit is contained in:
zotlabs
2017-10-26 15:23:04 -07:00
parent 4a3149d1ba
commit e5cfb8a0cd
2 changed files with 13 additions and 4 deletions

View File

@@ -41,7 +41,9 @@ class Owa extends \Zotlabs\Web\Controller {
$ret['success'] = true;
$token = random_string(32);
\Zotlabs\Zot\Verify::create('owt',0,$token,$r[0]['hubloc_addr']);
$ret['token'] = $token;
$result = '';
openssl_public_encrypt($token,$result,$hubloc['xchan_pubkey']);
$ret['encrypted_token'] = base64url_encode($result);
}
}
}