some high-level stuff we may need for shareable menus. Also make the client register function do the right thing even though I refuse to make it work. If **you** want service federation with things like pumpio and openid connect, it's time for **you** to put your own skin in the game and quit treating project volunteers like excrement just because you can't get up off your lazy buttocks.

This commit is contained in:
redmatrix
2015-05-27 17:30:36 -07:00
parent 5a889558aa
commit 11301d51a5
2 changed files with 83 additions and 67 deletions

View File

@@ -437,11 +437,6 @@ require_once('include/items.php');
function api_client_register(&$a,$type) {
// This currently isn't providing the correct authentication flow.
if(! local_channel())
goaway(z_root() . '/login');
$ret = array();
$key = random_string(16);
$secret = random_string(16);
@@ -460,12 +455,7 @@ require_once('include/items.php');
dbesc($name),
dbesc($redirect),
dbesc($icon),
intval(api_user())
);
$r = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
dbesc($key),
intval(api_user()),
dbesc('all')
intval(0)
);
$ret['client_id'] = $key;