Skip to content

Commit

Permalink
Removes dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
danielskovli committed Nov 20, 2024
1 parent 2ff9b64 commit 04d8f0c
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ await payload.ReadAsStringAsync(cancellationToken)
);

MaskinportenTokenResponse tokenResponse = await ParseServerResponse(response, cancellationToken);
JwtSecurityToken jwt = ParseJwt(tokenResponse.AccessToken, TokenAuthorities.Maskinporten);
DateTime expiry = jwt.ValidTo;
string? scope = jwt.Claims.FirstOrDefault(c => c.Type == JwtClaimTypes.Scope)?.Value;

_logger.LogDebug("Token retrieved successfully: {Token}", tokenResponse);
_telemetry?.RecordMaskinportenTokenRequest(Telemetry.Maskinporten.RequestResult.New);
Expand Down Expand Up @@ -283,9 +280,6 @@ private async Task<JwtToken> HandleMaskinportenAltinnTokenExchange(
response.EnsureSuccessStatusCode();

string token = await response.Content.ReadAsStringAsync(cancellationToken);
JwtSecurityToken jwt = ParseJwt(token, TokenAuthorities.AltinnTokenExchange);
DateTime expiry = jwt.ValidTo;
string? scope = jwt.Claims.FirstOrDefault(c => c.Type == JwtClaimTypes.Scope)?.Value;

_logger.LogDebug("Token retrieved successfully");
_telemetry?.RecordMaskinportenAltinnTokenExchangeRequest(Telemetry.Maskinporten.RequestResult.New);
Expand Down

0 comments on commit 04d8f0c

Please sign in to comment.