Still working on getting client credential flow complete, most of the request works but still working on generating the JWT.
This commit is contained in:
parent
1a8c63808a
commit
8782ef39c6
80 changed files with 1331 additions and 414 deletions
24
IdentityShroud.Api/GlobalExceptionHandler.cs
Normal file
24
IdentityShroud.Api/GlobalExceptionHandler.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using Microsoft.AspNetCore.Diagnostics;
|
||||
|
||||
namespace IdentityShroud.Api;
|
||||
|
||||
public class GlobalExceptionHandler : IExceptionHandler
|
||||
{
|
||||
private readonly ILogger<GlobalExceptionHandler> _logger;
|
||||
|
||||
public GlobalExceptionHandler(ILogger<GlobalExceptionHandler> logger)
|
||||
=> _logger = logger;
|
||||
|
||||
public async ValueTask<bool> TryHandleAsync(
|
||||
HttpContext httpContext,
|
||||
Exception exception,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogError(exception, "Exception type: {Type}, Message: {Message}",
|
||||
exception.GetType().Name, exception.Message);
|
||||
|
||||
// Return false to let other handlers or the default handle it
|
||||
// Return true to mark it as handled
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue