improve tokens on replys
This commit is contained in:
parent
74b5ab853c
commit
c34a3bd8dc
3 changed files with 3 additions and 3 deletions
|
|
@ -203,7 +203,7 @@ namespace SecondBotEvents.Services
|
|||
foreach(string url in DialogRelayHTTP)
|
||||
{
|
||||
long unixtime = SecondbotHelpers.UnixTimeNow();
|
||||
string token = SecondbotHelpers.GetSHA1(unixtime.ToString() + "DialogRelay"+GetClient().Self.AgentID+ eventMessage);
|
||||
string token = SecondbotHelpers.GetSHA1(unixtime.ToString() + "DialogRelay"+GetClient().Self.AgentID+ eventMessage + master.CommandsService.myConfig.GetSharedSecret());
|
||||
var client = new RestClient(url);
|
||||
var request = new RestRequest("Dialog/Relay", Method.Post);
|
||||
request.AddParameter("token", token);
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ namespace SecondBotEvents.Services
|
|||
if(myConfig.GetOutputHttpURL() != null)
|
||||
{
|
||||
long unixtime = SecondbotHelpers.UnixTimeNow();
|
||||
string token = SecondbotHelpers.GetSHA1(unixtime.ToString() + "EventService" + GetClient().Self.AgentID + output);
|
||||
string token = SecondbotHelpers.GetSHA1(unixtime.ToString() + "EventService" + GetClient().Self.AgentID + output + master.CommandsService.myConfig.GetSharedSecret());
|
||||
var client = new RestClient(myConfig.GetOutputHttpURL());
|
||||
var request = new RestRequest("Event/Service", Method.Post);
|
||||
request.AddParameter("token", token);
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ namespace SecondBotEvents.Services
|
|||
else if(targetType == "http")
|
||||
{
|
||||
long unixtime = SecondbotHelpers.UnixTimeNow();
|
||||
string token = SecondbotHelpers.GetSHA1(unixtime.ToString() + "RelayService" + GetClient().Self.AgentID + eventMessage);
|
||||
string token = SecondbotHelpers.GetSHA1(unixtime.ToString() + "RelayService" + GetClient().Self.AgentID + eventMessage + master.CommandsService.myConfig.GetSharedSecret());
|
||||
var client = new RestClient(targetOption);
|
||||
var request = new RestRequest("Relay/Service", Method.Post);
|
||||
request.AddParameter("token", token);
|
||||
|
|
|
|||
Loading…
Reference in a new issue