mirror of
https://github.com/bitwarden/server
synced 2025-12-23 19:53:40 +00:00
[PM-22580] Org/User License Codeownership Move (No logic changes) (#6080)
* Moved license models to billing * Moved LicensingService to billing * Moved license command and queries to billing * Moved LicenseController to billing
This commit is contained in:
28
src/Core/Billing/Services/ILicensingService.cs
Normal file
28
src/Core/Billing/Services/ILicensingService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Security.Claims;
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
using Bit.Core.Billing.Models.Business;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Business;
|
||||
|
||||
namespace Bit.Core.Billing.Services;
|
||||
|
||||
public interface ILicensingService
|
||||
{
|
||||
Task ValidateOrganizationsAsync();
|
||||
Task ValidateUsersAsync();
|
||||
Task<bool> ValidateUserPremiumAsync(User user);
|
||||
bool VerifyLicense(ILicense license);
|
||||
byte[] SignLicense(ILicense license);
|
||||
Task<OrganizationLicense?> ReadOrganizationLicenseAsync(Organization organization);
|
||||
Task<OrganizationLicense?> ReadOrganizationLicenseAsync(Guid organizationId);
|
||||
ClaimsPrincipal? GetClaimsPrincipalFromLicense(ILicense license);
|
||||
|
||||
Task<string?> CreateOrganizationTokenAsync(
|
||||
Organization organization,
|
||||
Guid installationId,
|
||||
SubscriptionInfo subscriptionInfo);
|
||||
|
||||
Task<string?> CreateUserTokenAsync(User user, SubscriptionInfo subscriptionInfo);
|
||||
}
|
||||
Reference in New Issue
Block a user