1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-29 07:06:15 -05:00

10 Commits

Author SHA1 Message Date
Conner Turnbull
ea13f51776
Cleaned up byte array logic 2025-06-26 11:50:37 -04:00
Conner Turnbull
a7e160a514
Removed remaining methods out of org and user licenses 2025-06-12 08:47:02 -04:00
Conner Turnbull
5ed8635f9c
Moved the remaining methods out of BaseLicense. Renamed GetDataBytes to ToByteArray 2025-06-11 09:40:40 -04:00
Conner Turnbull
c405092a1e
Moved VerifySignature out of the licenses and into an extension method 2025-06-11 09:40:40 -04:00
Conner Turnbull
7f28c4ff2f
Moved ComputeHash out of the licenses and into an extension method 2025-06-11 09:40:39 -04:00
Conner Turnbull
83f088b0fb
Updated expiration, refresh, and isTrial logic to ensure it matches the original logic 2025-06-11 09:40:39 -04:00
Conner Turnbull
6181d0961c
Updated LicenseIgnore to target Signature instead of Hash 2025-06-11 09:40:39 -04:00
Conner Turnbull
181e2ff551
Moved expires/refresh/trial methods to extension methods to be reused later 2025-06-11 09:40:39 -04:00
Conner Turnbull
6b472882b0
Extracted the core logic of GetDataBytes to be shared between both files 2025-06-11 09:40:39 -04:00
Conner Turnbull
04cf513d78
[PM-11516] Initial license file refactor (#5002)
* Added the ability to create a JWT on an organization license that contains all license properties as claims

* Added the ability to create a JWT on a user license that contains all license properties as claims

* Added ability to consume JWT licenses

* Resolved generic type issues when getting claim value

* Now validating the jwt signature, exp, and iat

* Moved creation of ClaimsPrincipal outside of licenses given dependecy on cert

* Ran dotnet format. Resolved identity error

* Updated claim types to use string constants

* Updated jwt expires to be one year

* Fixed bug requiring email verification to be on the token

* dotnet format

* Patch build process

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-12-05 14:31:14 +00:00