* Add license options, bump version, add Token claim
Added the missing license options:
- `ExpirationWithoutGracePeriod`
- `UseAutomaticUserConfirmation`
- `UsePhisingBlocker`
- `UseDisableSmAdsForUsers`
- `UseMyItems`
Bumped the license version from 15 to 16 (`UseOrganizationDomains` is valid only with version 16).
Added `GenerateUserToken` and `GenerateOrgToken` helpers to create the expected `Token` claim that’s still missing in our licenses.
Signed-off-by: Lorenzo Moscati <lorenzo@moscati.page>
* Address Copilot review
- Capture `now = DateTime.UtcNow` once per license-generation call and pass it
into GenerateUserToken/GenerateOrgToken, so all date fields in the JSON
license and the embedded JWT derive from the same instant (fixes drift across
separate DateTime.UtcNow calls)
- Move set("Token", ...) before ComputeHash/Sign in both GenerateUserLicense
and GenerateOrgLicense so all fields are finalised before signing
- Add UseRiskInsights claim to the org JWT; confirmed present as a required
claim in Bitwarden's OrganizationLicenseClaimsFactory
Version is intentionally excluded from both JWTs: neither UserLicenseClaimsFactory
nor OrganizationLicenseClaimsFactory generates it, and the claims-path VerifyData
never reads it.
Signed-off-by: Lorenzo Moscati <lorenzo@moscati.page>
---------
Signed-off-by: Lorenzo Moscati <lorenzo@moscati.page>