Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15441625
D21023.id50084.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
D21023.id50084.diff
View Options
diff --git a/src/applications/auth/adapter/PhutilJIRAAuthAdapter.php b/src/applications/auth/adapter/PhutilJIRAAuthAdapter.php
--- a/src/applications/auth/adapter/PhutilJIRAAuthAdapter.php
+++ b/src/applications/auth/adapter/PhutilJIRAAuthAdapter.php
@@ -22,12 +22,33 @@
return $this->jiraBaseURI;
}
- public function getAccountID() {
+ protected function newAccountIdentifiers() {
// Make sure the handshake is finished; this method is used for its
// side effect by Auth providers.
$this->getHandshakeData();
- return idx($this->getUserInfo(), 'key');
+ $info = $this->getUserInfo();
+
+ // See T13493. Older versions of JIRA provide a "key" with a username or
+ // email address. Newer versions of JIRA provide a GUID "accountId".
+ // Intermediate versions of JIRA provide both.
+
+ $identifiers = array();
+
+ $account_key = idx($info, 'key');
+ if ($account_key !== null) {
+ $identifiers[] = $this->newAccountIdentifier($account_key);
+ }
+
+ $account_id = idx($info, 'accountId');
+ if ($account_id !== null) {
+ $identifiers[] = $this->newAccountIdentifier(
+ sprintf(
+ 'accountId(%s)',
+ $account_id));
+ }
+
+ return $identifiers;
}
public function getAccountName() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 27, 6:54 PM (6 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383294
Default Alt Text
D21023.id50084.diff (1 KB)
Attached To
Mode
D21023: Read both older "key" and newer "accountId" identifiers from JIRA during authentication
Attached
Detach File
Event Timeline
Log In to Comment