-
Notifications
You must be signed in to change notification settings - Fork 75
Remove API Key references #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
apassant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
| @@ -237,9 +237,6 @@ private HttpURLConnection prepareConnection(HttpURLConnection conn) { | |||
|
|
|||
| private Map<String, String> createAuthorizationHeaders() { | |||
| switch (Intercom.getAuthKeyType()) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're removing API_KEY we could also remove this whole switch and just run
headers.put("Authorization", "Basic " + generateAuthString(Intercom.getToken(),""));
We can then remove getAuthKeyType() in Intercom class and get rid of AuthKeyType enum altogether.
@thewheat wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had initial thoughts of keeping it here in case we could have future authentication methods but for simplification, the removal of getAuthKeyType and AuthKeyType makes sense too 👍 I'll get to it 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmartinic updated 👌
556e888 to
99fe92c
Compare
| private volatile AuthKeyType authKeyType = AuthKeyType.API_KEY; | ||
| private volatile String apiKey; | ||
| private volatile String token; | ||
| private volatile String appID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can also remove appId here. It was used in conjunction with apiKey when generating the Auth header. Now we just need the token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
6c0a753 to
751af43
Compare
Why?
How?