Add OAuth credentials object for v2 Slack app#199
Merged
zmarushchak-hs merged 5 commits intomasterfrom Oct 20, 2020
Merged
Conversation
omotnyk
reviewed
Oct 20, 2020
Contributor
omotnyk
left a comment
There was a problem hiding this comment.
We heavily rely on bot user ID. Should we store it? Also, it seems like this changes the auth process completely. As far as I see, https://api.slack.com/methods/oauth.v2.access still returns both user and bot token but this model doesn't store user token. Is this intentional? Will we ever need this token again? right now we do a lot of things using user token. Will the migration process seamless in this case?
| public abstract String getAccessToken(); | ||
|
|
||
| @JsonProperty("team") | ||
| public abstract SlackTeamLite getSlackTeamLite(); |
Contributor
There was a problem hiding this comment.
I think this can be just getTeam. This way we don't need to override json property name.
| @HubSpotStyle | ||
| @JsonNaming(SnakeCaseStrategy.class) | ||
| public abstract class OAuthV2CredentialsIF { | ||
| public abstract String getAccessToken(); |
Contributor
There was a problem hiding this comment.
I wonder if we should rename this to getBotAccessToken.
omotnyk
approved these changes
Oct 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Object added in order to be able to deserialize response for oauth.v2.access request which is used on Slack app installation to exchange temporary OAuth code for an API access token.