mirror of
https://github.com/bitwarden/server.git
synced 2025-12-10 17:45:21 -06:00
* Refactor Slack Callback * Add more safety to state param, clarify if logic, update tests * Added an additional 2 possible cases to test: integration is not a slack integration, and the integration has already been claimed * Implement SonarQube suggestion * Adjusted org hash to include timestamp; addressed PR feedback
37 lines
957 B
C#
37 lines
957 B
C#
using Bit.Core.Services;
|
|
|
|
namespace Bit.Core.AdminConsole.Services.NoopImplementations;
|
|
|
|
public class NoopSlackService : ISlackService
|
|
{
|
|
public Task<string> GetChannelIdAsync(string token, string channelName)
|
|
{
|
|
return Task.FromResult(string.Empty);
|
|
}
|
|
|
|
public Task<List<string>> GetChannelIdsAsync(string token, List<string> channelNames)
|
|
{
|
|
return Task.FromResult(new List<string>());
|
|
}
|
|
|
|
public Task<string> GetDmChannelByEmailAsync(string token, string email)
|
|
{
|
|
return Task.FromResult(string.Empty);
|
|
}
|
|
|
|
public string GetRedirectUrl(string callbackUrl, string state)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
public Task SendSlackMessageByChannelIdAsync(string token, string message, string channelId)
|
|
{
|
|
return Task.FromResult(0);
|
|
}
|
|
|
|
public Task<string> ObtainTokenViaOAuth(string code, string redirectUrl)
|
|
{
|
|
return Task.FromResult(string.Empty);
|
|
}
|
|
}
|