mirror of
https://github.com/bitwarden/server.git
synced 2025-06-13 22:40:48 -05:00
29 lines
946 B
C#
29 lines
946 B
C#
#nullable enable
|
|
|
|
using System.Security.Claims;
|
|
using Bit.Core.AdminConsole.Entities;
|
|
using Bit.Core.Billing.Licenses.Models;
|
|
using Bit.Core.Entities;
|
|
using Bit.Core.Models.Business;
|
|
|
|
namespace Bit.Core.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);
|
|
}
|