Removed logging
This commit is contained in:
@@ -100,15 +100,15 @@ public abstract class AuthControllerBase : Controller
|
|||||||
|
|
||||||
protected async Task<IActionResult> CreateJwtFromId(string uid, string charaIdent, string alias)
|
protected async Task<IActionResult> CreateJwtFromId(string uid, string charaIdent, string alias)
|
||||||
{
|
{
|
||||||
var token = CreateJwt(new List<Claim>()
|
var token = CreateJwt(
|
||||||
{
|
[
|
||||||
new Claim(LightlessClaimTypes.Uid, uid),
|
new Claim(LightlessClaimTypes.Uid, uid),
|
||||||
new Claim(LightlessClaimTypes.CharaIdent, charaIdent),
|
new Claim(LightlessClaimTypes.CharaIdent, charaIdent),
|
||||||
new Claim(LightlessClaimTypes.Alias, alias),
|
new Claim(LightlessClaimTypes.Alias, alias),
|
||||||
new Claim(LightlessClaimTypes.Expires, DateTime.UtcNow.AddHours(6).Ticks.ToString(CultureInfo.InvariantCulture)),
|
new Claim(LightlessClaimTypes.Expires, DateTime.UtcNow.AddHours(6).Ticks.ToString(CultureInfo.InvariantCulture)),
|
||||||
new Claim(LightlessClaimTypes.Continent, await _geoIPProvider.GetContinentFromIP(HttpAccessor)),
|
new Claim(LightlessClaimTypes.Continent, await _geoIPProvider.GetContinentFromIP(HttpAccessor)),
|
||||||
new Claim(LightlessClaimTypes.Country, await _geoIPProvider.GetCountryFromIP(HttpAccessor)),
|
new Claim(LightlessClaimTypes.Country, await _geoIPProvider.GetCountryFromIP(HttpAccessor)),
|
||||||
});
|
]);
|
||||||
|
|
||||||
return Content(token.RawData);
|
return Content(token.RawData);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,12 +162,8 @@ public class GeoIPService : IHostedService
|
|||||||
|
|
||||||
if (_dbReader!.TryCity(ip, out var response))
|
if (_dbReader!.TryCity(ip, out var response))
|
||||||
{
|
{
|
||||||
_logger.LogWarning(ip.ToString());
|
|
||||||
_logger.LogWarning(response?.Country?.ToString());
|
|
||||||
_logger.LogWarning(response?.Country?.IsoCode);
|
|
||||||
|
|
||||||
var country = response?.Country?.IsoCode;
|
var country = response?.Country?.IsoCode;
|
||||||
return !string.IsNullOrEmpty(country) ? country : "*";
|
return country ?? "*";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "*";
|
return "*";
|
||||||
|
|||||||
Reference in New Issue
Block a user