Replace AccountExternalId with ExternalId
Change-Id: Ib1361fecc4f57732ee699cccf77e9f639d6fcf13
diff --git a/src/main/java/com/googlesource/gerrit/plugins/cfoauth/CFOAuthService.java b/src/main/java/com/googlesource/gerrit/plugins/cfoauth/CFOAuthService.java
index 9647f1d..75ffe0d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/cfoauth/CFOAuthService.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/cfoauth/CFOAuthService.java
@@ -14,6 +14,8 @@
package com.googlesource.gerrit.plugins.cfoauth;
+import static com.google.gerrit.server.account.externalids.ExternalId.SCHEME_EXTERNAL;
+
import com.google.common.base.CharMatcher;
import com.google.gerrit.extensions.annotations.PluginName;
import com.google.gerrit.extensions.auth.oauth.OAuthLoginProvider;
@@ -21,7 +23,6 @@
import com.google.gerrit.extensions.auth.oauth.OAuthToken;
import com.google.gerrit.extensions.auth.oauth.OAuthUserInfo;
import com.google.gerrit.extensions.auth.oauth.OAuthVerifier;
-import com.google.gerrit.reviewdb.client.AccountExternalId;
import com.google.gerrit.server.config.AuthConfig;
import com.google.gerrit.server.config.CanonicalWebUrl;
import com.google.gerrit.server.config.PluginConfig;
@@ -142,7 +143,7 @@
}
private static OAuthUserInfo getAsOAuthUserInfo(String username) {
- return new OAuthUserInfo(AccountExternalId.SCHEME_EXTERNAL + username,
+ return new OAuthUserInfo(SCHEME_EXTERNAL + username,
username, null, null, null);
}
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/cfoauth/UserInfo.java b/src/main/java/com/googlesource/gerrit/plugins/cfoauth/UserInfo.java
index c9418f5..62ce5a0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/cfoauth/UserInfo.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/cfoauth/UserInfo.java
@@ -14,7 +14,7 @@
package com.googlesource.gerrit.plugins.cfoauth;
-import com.google.gerrit.reviewdb.client.AccountExternalId;
+import static com.google.gerrit.server.account.externalids.ExternalId.SCHEME_EXTERNAL;
import java.io.Serializable;
import java.util.Objects;
@@ -42,7 +42,7 @@
throw new IllegalArgumentException("emailAddress must not be null");
}
this.username = username;
- this.externalId = AccountExternalId.SCHEME_EXTERNAL + username;
+ this.externalId = SCHEME_EXTERNAL + username;
this.emailAddress = emailAddress;
this.displayName = username;
}