Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15399435
D11378.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11378.diff
View Options
diff --git a/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php b/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php
--- a/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php
+++ b/src/applications/oauthserver/storage/PhabricatorOAuthServerClient.php
@@ -2,7 +2,9 @@
final class PhabricatorOAuthServerClient
extends PhabricatorOAuthServerDAO
- implements PhabricatorPolicyInterface {
+ implements
+ PhabricatorPolicyInterface,
+ PhabricatorDestructibleInterface {
protected $secret;
protected $name;
@@ -89,4 +91,33 @@
return null;
}
+/* -( PhabricatorDestructibleInterface )----------------------------------- */
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $this->delete();
+
+ $authorizations = id(new PhabricatorOAuthClientAuthorization())
+ ->loadAllWhere('clientPHID = %s', $this->getPHID());
+ foreach ($authorizations as $authorization) {
+ $authorization->delete();
+ }
+
+ $tokens = id(new PhabricatorOAuthServerAccessToken())
+ ->loadAllWhere('clientPHID = %s', $this->getPHID());
+ foreach ($tokens as $token) {
+ $token->delete();
+ }
+
+ $codes = id(new PhabricatorOAuthServerAuthorizationCode())
+ ->loadAllWhere('clientPHID = %s', $this->getPHID());
+ foreach ($codes as $code) {
+ $code->delete();
+ }
+
+ $this->saveTransaction();
+
+ }
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 4:31 AM (2 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709383
Default Alt Text
D11378.diff (1 KB)
Attached To
Mode
D11378: OAuthServer - implement destructible interface on oauth server client objects
Attached
Detach File
Event Timeline
Log In to Comment