Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SlackAuthReturnURL ¶
SlackAuthReturnURL formats an oauth return uri.
func SlackAuthURL ¶
SlackAuthURL is the url to start the OAuth 2.0 process with slack.
Types ¶
type SlackOAuthResponse ¶
type SlackOAuthResponse struct { OK bool `json:"ok"` Error string `json:"error"` AccessToken string `json:"access_token"` Scope string `json:"scopes"` UserID string `json:"user_id"` TeamID string `json:"team_id"` TeamName string `json:"team_name"` }
SlackOAuthResponse is the response from the second phase of slack oauth 2.0
func SlackOAuth ¶
func SlackOAuth(code string, cfg *config.Giffy) (*SlackOAuthResponse, error)
SlackOAuth completes the oauth 2.0 process with slack.
type SlackProfile ¶
type SlackProfile struct { OK bool `json:"ok"` URL string `json:"url"` User string `json:"user"` Team string `json:"team"` UserID string `json:"user_id"` TeamID string `json:"team_id"` }
SlackProfile is the response from the auth.test service.
func FetchSlackProfile ¶
func FetchSlackProfile(accessToken string, cfg *config.Giffy) (*SlackProfile, error)
FetchSlackProfile gets the slack user details for an access token.
Click to show internal directories.
Click to hide internal directories.