Skip to content
Snippets Groups Projects
Commit 88c6928b authored by Tom Needham's avatar Tom Needham
Browse files

API: Use OC_API::checkLoggedIn() and OAuth scopes are app_$appname

parent 395a056b
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ switch($operation){
}
break;
case 'authorise';
OC_Util::checkLoggedIn();
OC_API::checkLoggedIn();
// Example
$consumer = array(
'name' => 'Firefox Bookmark Sync',
......@@ -38,6 +38,8 @@ switch($operation){
$apps = OC_App::getEnabledApps();
$notfound = array();
foreach($consumer['scopes'] as $requiredapp){
// App scopes are in this format: app_$appname
$requiredapp = end(explode('_', $requiredapp));
if(!in_array($requiredapp, $apps)){
$notfound[] = $requiredapp;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment