Remove @group annotations
Summary: I'm pretty sure that `@group` annotations are useless now... see D9855. Also fixed various other minor issues. Test Plan: Eye-ball it. Reviewers: #blessed_reviewers, epriestley, chad Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin, hach-que Differential Revision: https://secure.phabricator.com/D9859
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @group oauthserver
|
||||
*/
|
||||
final class PhabricatorOAuthResponse extends AphrontResponse {
|
||||
|
||||
private $state;
|
||||
@@ -47,6 +44,7 @@ final class PhabricatorOAuthResponse extends AphrontResponse {
|
||||
private function getError() {
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
public function setError($error) {
|
||||
// errors sometimes redirect to the client (302) but otherwise
|
||||
// the spec says all code 400
|
||||
@@ -60,6 +58,7 @@ final class PhabricatorOAuthResponse extends AphrontResponse {
|
||||
private function getErrorDescription() {
|
||||
return $this->errorDescription;
|
||||
}
|
||||
|
||||
public function setErrorDescription($error_description) {
|
||||
$this->errorDescription = $error_description;
|
||||
return $this;
|
||||
@@ -104,4 +103,5 @@ final class PhabricatorOAuthResponse extends AphrontResponse {
|
||||
public function buildResponseString() {
|
||||
return $this->encodeJSONForHTTPResponse($this->buildResponseDict());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
* For an OAuth 2.0 server, there are two main steps:
|
||||
*
|
||||
* 1) Authorization - the user authorizes a given client to access the data
|
||||
* the OAuth 2.0 server protects. Once this is achieved / if it has
|
||||
* the OAuth 2.0 server protects. Once this is achieved / if it has
|
||||
* been achived already, the OAuth server sends the client an authorization
|
||||
* code.
|
||||
* 2) Access Token - the client should send the authorization code received in
|
||||
* step 1 along with its id and secret to the OAuth server to receive an
|
||||
* access token. This access token can later be used to access Phabricator
|
||||
* access token. This access token can later be used to access Phabricator
|
||||
* data on behalf of the user.
|
||||
*
|
||||
* @task auth Authorizing @{class:PhabricatorOAuthServerClient}s and
|
||||
@@ -25,8 +25,6 @@
|
||||
* @task token Validating @{class:PhabricatorOAuthServerAuthorizationCode}s
|
||||
* and generating @{class:PhabricatorOAuthServerAccessToken}s
|
||||
* @task internal Internals
|
||||
*
|
||||
* @group oauthserver
|
||||
*/
|
||||
final class PhabricatorOAuthServer {
|
||||
|
||||
@@ -36,9 +34,6 @@ final class PhabricatorOAuthServer {
|
||||
private $user;
|
||||
private $client;
|
||||
|
||||
/**
|
||||
* @group internal
|
||||
*/
|
||||
private function getUser() {
|
||||
if (!$this->user) {
|
||||
throw new Exception('You must setUser before you can getUser!');
|
||||
@@ -51,9 +46,6 @@ final class PhabricatorOAuthServer {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @group internal
|
||||
*/
|
||||
private function getClient() {
|
||||
if (!$this->client) {
|
||||
throw new Exception('You must setClient before you can getClient!');
|
||||
|
||||
@@ -63,7 +63,7 @@ final class PhabricatorOAuthServerScope {
|
||||
|
||||
/**
|
||||
* A scopes list is considered valid if each scope is a known scope
|
||||
* and each scope is seen only once. Otherwise, the list is invalid.
|
||||
* and each scope is seen only once. Otherwise, the list is invalid.
|
||||
*/
|
||||
static public function validateScopesList($scope_list) {
|
||||
$scopes = explode(' ', $scope_list);
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @group oauthserver
|
||||
*/
|
||||
final class PhabricatorOAuthServerAuthController
|
||||
extends PhabricatorAuthController {
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return true;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @group oauthserver
|
||||
*/
|
||||
final class PhabricatorOAuthServerTokenController
|
||||
extends PhabricatorAuthController {
|
||||
extends PhabricatorAuthController {
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return false;
|
||||
@@ -137,4 +134,5 @@ extends PhabricatorAuthController {
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @group oauthserver
|
||||
*/
|
||||
final class PhabricatorOAuthServerAccessToken
|
||||
extends PhabricatorOAuthServerDAO {
|
||||
extends PhabricatorOAuthServerDAO {
|
||||
|
||||
protected $id;
|
||||
protected $token;
|
||||
protected $userPHID;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @group oauthserver
|
||||
*/
|
||||
final class PhabricatorOAuthServerAuthorizationCode
|
||||
extends PhabricatorOAuthServerDAO {
|
||||
extends PhabricatorOAuthServerDAO {
|
||||
|
||||
protected $id;
|
||||
protected $code;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @group oauthserver
|
||||
*/
|
||||
abstract class PhabricatorOAuthServerDAO extends PhabricatorLiskDAO {
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'oauth_server';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user