Skip to content

Commit 3e4e43d

Browse files
committed
chore: log cleanups
1 parent 541cf0b commit 3e4e43d

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI/Activities/User/Operations/GetSearchProfile.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public async Task<SearchProfile> Handle(Query request, CancellationToken cancell
5151

5252
if (userSearchProfile is null)
5353
{
54-
_logger.LogInformation("Failed to retrieve search profile: {RequestProfileId}", request.ProfileId);
5554
throw new NotFoundException($"Specified search profile not found by ID: {request.ProfileId}");
5655
}
5756

VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI/Helpers/Services/TestbedConsentSecurityService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public TestbedConsentSecurityService(ILogger<TestbedConsentSecurityService> logg
2424

2525
public async Task VerifyConsentTokenRequestHeaders(IHeaderDictionary headers, string dataSourceUri)
2626
{
27-
_logger.LogInformation("Verifying consent request");
27+
_logger.LogDebug("Verifying consent request");
2828
var idToken = headers.Authorization.ToString().Replace("Bearer ", string.Empty);
2929
if (string.IsNullOrEmpty(idToken))
3030
throw new NotAuthorizedException("Authorization token is missing");
@@ -36,12 +36,12 @@ public async Task VerifyConsentTokenRequestHeaders(IHeaderDictionary headers, st
3636
VerifyConsentToken(consentToken, idToken, dataSourceUri);
3737
await VerifyConsentTokenWithService(consentToken, idToken, dataSourceUri); // Checks for token revokation
3838

39-
_logger.LogInformation("Consent request verified");
39+
_logger.LogDebug("Consent request verified");
4040
}
4141

4242
public void VerifyConsentToken(string consentTokenRaw, string idTokenRaw, string dataSourceUri)
4343
{
44-
_logger.LogInformation("Verifying consent token");
44+
_logger.LogDebug("Verifying consent token");
4545

4646
var idToken = ParseJwtToken(idTokenRaw);
4747
if (idToken == null)
@@ -96,13 +96,13 @@ public void VerifyConsentToken(string consentTokenRaw, string idTokenRaw, string
9696
if (consentToken.Payload["dsi"] as string != dataSourceUri)
9797
throw new NotAuthorizedException("Token mismatch: dsi");
9898

99-
_logger.LogInformation("Consent token verified");
99+
_logger.LogDebug("Consent token verified");
100100
}
101101

102102

103103
public async Task VerifyConsentTokenWithService(string consentToken, string idToken, string dataSourceUri)
104104
{
105-
_logger.LogInformation("Verifying consent with Testbed Consent API");
105+
_logger.LogDebug("Verifying consent with Testbed Consent API");
106106
try
107107
{
108108
var httpClient = _httpClientFactory.CreateClient();
@@ -130,7 +130,7 @@ public async Task VerifyConsentTokenWithService(string consentToken, string idTo
130130
throw new NotAuthorizedException(e.Message);
131131
}
132132

133-
_logger.LogInformation("Consent verified by Testbed Consent API");
133+
_logger.LogDebug("Consent verified by Testbed Consent API");
134134
}
135135

136136

0 commit comments

Comments
 (0)