mirror of
https://github.com/bitwarden/server.git
synced 2025-02-18 02:11:22 +01:00
Ran dotnet format. Resolved identity error
This commit is contained in:
parent
d366592446
commit
8cd040641f
@ -1,10 +1,7 @@
|
|||||||
using System.IdentityModel.Tokens.Jwt;
|
using System.Security.Claims;
|
||||||
using System.Security.Claims;
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using Bit.Core.AdminConsole.Entities;
|
using Bit.Core.AdminConsole.Entities;
|
||||||
using Bit.Core.Billing.Enums;
|
using Bit.Core.Billing.Enums;
|
||||||
using Bit.Core.Models.Business;
|
using Bit.Core.Models.Business;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
|
||||||
|
|
||||||
namespace Bit.Core.Billing.Licenses.Extensions;
|
namespace Bit.Core.Billing.Licenses.Extensions;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
|
|
||||||
namespace Bit.Core.Models.Business;
|
namespace Bit.Core.Models.Business;
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ using Bit.Core.Billing.Licenses.Extensions;
|
|||||||
using Bit.Core.Billing.Licenses.Models;
|
using Bit.Core.Billing.Licenses.Models;
|
||||||
using Bit.Core.Billing.Licenses.Services;
|
using Bit.Core.Billing.Licenses.Services;
|
||||||
using Bit.Core.Entities;
|
using Bit.Core.Entities;
|
||||||
|
using Bit.Core.Exceptions;
|
||||||
using Bit.Core.Models.Business;
|
using Bit.Core.Models.Business;
|
||||||
using Bit.Core.Repositories;
|
using Bit.Core.Repositories;
|
||||||
using Bit.Core.Settings;
|
using Bit.Core.Settings;
|
||||||
@ -336,7 +337,9 @@ public class LicensingService : ILicensingService
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw new SecurityTokenValidationException("License token validation failed.", ex);
|
// Token exceptions thrown are interpreted by the client as Identity errors and cause the user to logout
|
||||||
|
// Mask them by rethrowing as BadRequestException
|
||||||
|
throw new BadRequestException($"Invalid license. {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user