Skip to content

Commit

Permalink
Implement ISlackAdapterOptions (#2)
Browse files Browse the repository at this point in the history
* Add botbuilder-slack-adapter project

* Ported ISlackAdapterOptions Interface
Removed unnecessary using's

* Updated references
  • Loading branch information
gasper-az authored and matiasroldan6 committed May 15, 2019
1 parent f2ac3ba commit e604a67
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 17 deletions.
14 changes: 7 additions & 7 deletions Botkit/Botkit.sln
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.421
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotkitLibrary", "Botkit\BotkitLibrary.csproj", "{27A6C425-DA23-4D95-B754-9A4BA6C2CE46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adapters", "Adapters\Adapters.csproj", "{C8653379-44A7-4B6A-8CCE-345FABA1FCBC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "botbuilder-slack-adapter", "botbuilder-slack-adapter\botbuilder-slack-adapter.csproj", "{E2B0D367-41B9-406E-90A8-89C7648A926A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -17,10 +17,10 @@ Global
{27A6C425-DA23-4D95-B754-9A4BA6C2CE46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27A6C425-DA23-4D95-B754-9A4BA6C2CE46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27A6C425-DA23-4D95-B754-9A4BA6C2CE46}.Release|Any CPU.Build.0 = Release|Any CPU
{C8653379-44A7-4B6A-8CCE-345FABA1FCBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8653379-44A7-4B6A-8CCE-345FABA1FCBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8653379-44A7-4B6A-8CCE-345FABA1FCBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8653379-44A7-4B6A-8CCE-345FABA1FCBC}.Release|Any CPU.Build.0 = Release|Any CPU
{E2B0D367-41B9-406E-90A8-89C7648A926A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2B0D367-41B9-406E-90A8-89C7648A926A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2B0D367-41B9-406E-90A8-89C7648A926A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2B0D367-41B9-406E-90A8-89C7648A926A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 0 additions & 6 deletions Botkit/Botkit/BotkitLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,6 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Adapters\Adapters.csproj">
<Project>{c8653379-44a7-4b6a-8cce-345faba1fcbc}</Project>
<Name>Adapters</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
52 changes: 48 additions & 4 deletions Botkit/botbuilder-slack-adapter/ISlackAdapterOptions.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace botbuilder_slack_adapter
{
interface ISlackAdapterOptions
{
/// <summary>
/// Legacy method for validating the origin of incoming webhooks.
/// </summary>
string VerificationToken { get; }

/// <summary>
/// A token used to validate that incoming webhooks originated with Slack.
/// </summary>
string ClientSigningSecret { get; }

/// <summary>
/// A token (provided by Slack) for a bot to work on a single workspace.
/// </summary>
string BotToken { get; }

/// <summary>
/// The oauth client id provided by Slack for multi-team apps.
/// </summary>
string ClientId { get; }

/// <summary>
/// The oauth client secret provided by Slack for multi-team apps.
/// </summary>
string ClientSecret { get; }

/// <summary>
/// A an array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com.
/// </summary>
string[] Scopes { get; }

/// <summary>
/// The URL users will be redirected to after an oauth flow. In most cases, should be `https://<mydomain.com>/install/auth`.
/// </summary>
string RedirectUri { get; }

/// <summary>
/// A method that receives a Slack team id and returns the bot token associated with that team. Required for multi-team apps.
/// </summary>
/// <param name="TeamId">Team ID</param>
/// <returns></returns>
Task<string> GetTokenForTeam(string TeamId);

/// <summary>
/// A method that receives a Slack team id and returns the bot user id associated with that team. Required for multi-team apps.
/// </summary>
/// <param name="TeamId">Team ID.</param>
/// <returns></returns>
Task<string> GetBotUserByTeam(string TeamId);
}
}
16 changes: 16 additions & 0 deletions Botkit/botbuilder-slack-adapter/botbuilder-slack-adapter.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>botbuilder_slack_adapter</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder" Version="4.4.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Botkit\BotkitLibrary.csproj" />
</ItemGroup>

</Project>

0 comments on commit e604a67

Please sign in to comment.