Skip to content

Commit 8b31e06

Browse files
author
Ed Fricker
committed
Ed: better naming :)
1 parent ed2f7de commit 8b31e06

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

intercom-java/src/main/java/io/intercom/api/HttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private HttpURLConnection prepareConnection(HttpURLConnection conn) {
227227
}
228228

229229
private Map<String, String> createAuthorizationHeaders() {
230-
switch (Intercom.getAuthScheme()) {
230+
switch (Intercom.getAuthKeyType()) {
231231
case BEARER:
232232
headers.put("Authorization", "Bearer " + Intercom.getApiKey());
233233
break;

intercom-java/src/main/java/io/intercom/api/Intercom.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public class Intercom {
88

99
private static volatile URI apiBaseURI = API_BASE_URI;
1010

11-
private static volatile AuthenticationSchemes authenticationScheme = AuthenticationSchemes.API_KEY;
11+
private static volatile AuthKeyType authKeyType = AuthKeyType.API_KEY;
1212

13-
enum AuthenticationSchemes {
13+
enum AuthKeyType {
1414
API_KEY,
1515
BEARER,
1616
PERSONAL_ACCESS_TOKEN
@@ -81,7 +81,7 @@ public static void setAppID(String appID) {
8181
}
8282

8383
public static void setPersonalAccessToken(String personalAccessToken) {
84-
authenticationScheme = AuthenticationSchemes.PERSONAL_ACCESS_TOKEN;
84+
authKeyType = AuthKeyType.PERSONAL_ACCESS_TOKEN;
8585
Intercom.personalAccessToken = personalAccessToken;
8686
}
8787

@@ -90,7 +90,7 @@ public static String getApiKey() {
9090
}
9191

9292
public static void setApiKey(String apiKey) {
93-
authenticationScheme = AuthenticationSchemes.API_KEY;
93+
authKeyType = AuthKeyType.API_KEY;
9494
Intercom.apiKey = apiKey;
9595
}
9696

@@ -102,8 +102,8 @@ public static void setApiBaseURI(URI apiBaseURI) {
102102
Intercom.apiBaseURI = apiBaseURI;
103103
}
104104

105-
static AuthenticationSchemes getAuthScheme() {
106-
return authenticationScheme;
105+
static AuthKeyType getAuthKeyType() {
106+
return authKeyType;
107107
}
108108

109109
public static String getPersonalAccessToken() {

0 commit comments

Comments
 (0)