diff --git a/oauth.go b/oauth.go index d9aca5f3b..0a04a4468 100644 --- a/oauth.go +++ b/oauth.go @@ -33,17 +33,18 @@ type OAuthResponse struct { // OAuthV2Response ... type OAuthV2Response struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - Scope string `json:"scope"` - BotUserID string `json:"bot_user_id"` - AppID string `json:"app_id"` - Team OAuthV2ResponseTeam `json:"team"` - IncomingWebhook OAuthResponseIncomingWebhook `json:"incoming_webhook"` - Enterprise OAuthV2ResponseEnterprise `json:"enterprise"` - AuthedUser OAuthV2ResponseAuthedUser `json:"authed_user"` - RefreshToken string `json:"refresh_token"` - ExpiresIn int `json:"expires_in"` + AccessToken string `json:"access_token"` + TokenType string `json:"token_type"` + Scope string `json:"scope"` + BotUserID string `json:"bot_user_id"` + AppID string `json:"app_id"` + Team OAuthV2ResponseTeam `json:"team"` + IncomingWebhook OAuthResponseIncomingWebhook `json:"incoming_webhook"` + Enterprise OAuthV2ResponseEnterprise `json:"enterprise"` + AuthedUser OAuthV2ResponseAuthedUser `json:"authed_user"` + RefreshToken string `json:"refresh_token"` + ExpiresIn int `json:"expires_in"` + IsEnterpriseInstall bool `json:"is_enterprise_install"` SlackResponse } @@ -61,10 +62,12 @@ type OAuthV2ResponseEnterprise struct { // OAuthV2ResponseAuthedUser ... type OAuthV2ResponseAuthedUser struct { - ID string `json:"id"` - Scope string `json:"scope"` - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` + ID string `json:"id"` + Scope string `json:"scope"` + AccessToken string `json:"access_token"` + TokenType string `json:"token_type"` + RefreshToken string `json:"refresh_token,omitempty"` + ExpiresIn int `json:"expires_in,omitempty"` } // GetOAuthToken retrieves an AccessToken