Changeset View
Changeset View
Standalone View
Standalone View
src/applications/oauthserver/PhabricatorOAuthServerScope.php
<?php | <?php | ||||
final class PhabricatorOAuthServerScope extends Phobject { | final class PhabricatorOAuthServerScope extends Phobject { | ||||
const SCOPE_OFFLINE_ACCESS = 'offline_access'; | const SCOPE_OFFLINE_ACCESS = 'offline_access'; | ||||
const SCOPE_WHOAMI = 'whoami'; | const SCOPE_WHOAMI = 'whoami'; | ||||
const SCOPE_NOT_ACCESSIBLE = 'not_accessible'; | |||||
/* | |||||
* Note this does not contain SCOPE_NOT_ACCESSIBLE which is magic | |||||
* used to simplify code for data that is not currently accessible | |||||
* via OAuth. | |||||
*/ | |||||
public static function getScopesDict() { | public static function getScopesDict() { | ||||
return array( | return array( | ||||
self::SCOPE_OFFLINE_ACCESS => 1, | self::SCOPE_OFFLINE_ACCESS => 1, | ||||
self::SCOPE_WHOAMI => 1, | self::SCOPE_WHOAMI => 1, | ||||
); | ); | ||||
} | } | ||||
public static function getDefaultScope() { | public static function getDefaultScope() { | ||||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |