Update DataInboc auth
This commit is contained in:
@@ -54,7 +54,7 @@ public class DataInboxController : Controller
|
|||||||
var authValue = Encoding.UTF8.GetString(Convert.FromBase64String(credentialsArr[1]));
|
var authValue = Encoding.UTF8.GetString(Convert.FromBase64String(credentialsArr[1]));
|
||||||
var username = authValue.Split(':')[0];
|
var username = authValue.Split(':')[0];
|
||||||
var password = authValue.Split(':')[1];
|
var password = authValue.Split(':')[1];
|
||||||
if (username != _configuration["morska-user"] || password != _configuration["morska-pass"])
|
if (username != _configuration["apiUser"] || password != _configuration["apiPass"])
|
||||||
{
|
{
|
||||||
_logger.LogWarning("DataInbox: Unauthorized request - bad credentials for source {Source}", dataInbox.Source);
|
_logger.LogWarning("DataInbox: Unauthorized request - bad credentials for source {Source}", dataInbox.Source);
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
@@ -77,7 +77,6 @@ public class DataInboxController : Controller
|
|||||||
if (dataInbox.Name == "morska.d3.importer")
|
if (dataInbox.Name == "morska.d3.importer")
|
||||||
{
|
{
|
||||||
_logger.LogDebug("DataInbox: Detected morska.d3.importer - processing will be handled by AutoImport");
|
_logger.LogDebug("DataInbox: Detected morska.d3.importer - processing will be handled by AutoImport");
|
||||||
// AutoImport będzie obsługiwać ten typ danych
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok();
|
return Ok();
|
||||||
|
|||||||
Reference in New Issue
Block a user