According to log Audience is invalid, below is JWT and Module code:
022-10-12 00:44:56.852 +02:00 [INF] Request starting HTTP/1.1 GET https://REDACTED/api/app/orders application/json -
2022-10-12 00:44:56.854 +02:00 [INF] Failed to validate the token.
Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'System.String'. Did not match: validationParameters.ValidAudience: 'System.String' or validationParameters.ValidAudiences: 'System.String'.
at Microsoft.IdentityModel.Tokens.Validators.ValidateAudience(IEnumerable1 audiences, SecurityToken securityToken, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateTokenPayload(JwtSecurityToken jwtToken, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() 2022-10-12 00:44:56.854 +02:00 [INF] Bearer was not authenticated. Failure message: IDX10214: Audience validation failed. Audiences: 'System.String'. Did not match: validationParameters.ValidAudience: 'System.String' or validationParameters.ValidAudiences: 'System.String'. 2022-10-12 00:44:56.855 +02:00 [INF] Executing endpoint 'Waltons.Switch.Controllers.Orders.OrderController.GetListAsync (Waltons.Switch.HttpApi)' 2022-10-12 00:44:56.855 +02:00 [INF] Route matched with {area = "app", controller = "Order", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task
1[Volo.Abp.Application.Dtos.PagedResultDto`1[Waltons.Switch.Orders.OrderWithNavigationPropertiesDto]] GetListAsync(Waltons.Switch.Orders.GetOrdersInput) on controller Waltons.Switch.Controllers.Orders.OrderController (Waltons.Switch.HttpApi).
2022-10-12 00:44:56.866 +02:00 [INF] Authorization failed. These requirements were not met:
PermissionRequirement: Switch.Orders
2022-10-12 00:44:56.868 +02:00 [WRN] ---------- RemoteServiceErrorInfo ----------
{
"code": "Volo.Authorization:010001",
"message": "Authorization failed! Given policy has not granted.",
"details": null,
"data": {},
"validationErrors": null
}
Looks like that did the trick thank you! I will run some more testing over the coming days
Created a fresh 5.2.1 Blazor Server project using the suite, getting "type or namespace AbpUowHubFilter not found"
This wasn't an issue on < 5.2 of ABP