View Source Ueberauth.Strategy.SlackV2.OAuth (Ueberauth Slack V2 v2.0.1)

An implementation of OAuth2 for Slack OAuth V2 API. To add your client_id and client_secret include these values in your configuration.

config :ueberauth, Ueberauth.Strategy.SlackV2.OAuth,
  client_id: System.get_env("SLACK_CLIENT_ID"),
  client_secret: System.get_env("SLACK_CLIENT_SECRET")

The JSON serializer used is the same as Ueberauth so if you need to customize it, you can configure it in the Ueberauth configuration:

config :ueberauth, Ueberauth,
  json_library: Poison # Defaults to Jason

Summary

Functions

Link to this function

authorize_url(client, params)

View Source

Callback implementation for OAuth2.Strategy.authorize_url/2.

Link to this function

authorize_url!(params \\ [], opts \\ [])

View Source
Link to this function

get(token, url, params \\ %{}, headers \\ [], opts \\ [])

View Source
Link to this function

get_token(client, params, headers)

View Source

Callback implementation for OAuth2.Strategy.get_token/3.

Link to this function

get_token!(params \\ [], options \\ %{})

View Source
@spec get_token!(list(), map()) ::
  {%OAuth2.AccessToken{
     access_token: term(),
     expires_at: term(),
     other_params: term(),
     refresh_token: term(),
     token_type: term()
   }
   | nil,
   %OAuth2.AccessToken{
     access_token: term(),
     expires_at: term(),
     other_params: term(),
     refresh_token: term(),
     token_type: term()
   }
   | nil}

Returns two tokens from Slack API, a "bot token" and a "user token"