Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Add ToUnixTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
engineering87 committed Sep 26, 2024
1 parent 4fd3042 commit 6c7acf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PDNDClientAssertionGenerator/Services/OAuth2Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public OAuth2Service(ClientAssertionConfig config)
}

// Asynchronously generates a client assertion JWT token.
public Task<string> GenerateClientAssertionAsync()
public async Task<string> GenerateClientAssertionAsync()
{
// Generate a unique token ID (JWT ID)
Guid tokenId = Guid.NewGuid();
Expand Down Expand Up @@ -74,7 +74,7 @@ public Task<string> GenerateClientAssertionAsync()
var tokenHandler = new JwtSecurityTokenHandler();
string clientAssertion = tokenHandler.WriteToken(token);

return Task.FromResult(clientAssertion); // Return the generated token as a string.
return await Task.FromResult(clientAssertion); // Return the generated token as a string.
}

// Asynchronously requests an access token by sending the client assertion to the OAuth2 server.
Expand Down

0 comments on commit 6c7acf8

Please sign in to comment.