You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.9 KiB
50 lines
1.9 KiB
using System.Reflection; |
|
|
|
namespace Bit.Core; |
|
|
|
public static class Constants |
|
{ |
|
public const int BypassFiltersEventId = 12482444; |
|
|
|
// File size limits - give 1 MB extra for cushion. |
|
// Note: if request size limits are changed, 'client_max_body_size' |
|
// in nginx/proxy.conf may also need to be updated accordingly. |
|
public const long FileSize101mb = 101L * 1024L * 1024L; |
|
public const long FileSize501mb = 501L * 1024L * 1024L; |
|
public const string DatabaseFieldProtectorPurpose = "DatabaseFieldProtection"; |
|
public const string DatabaseFieldProtectedPrefix = "P|"; |
|
|
|
/// <summary> |
|
/// Default number of days an organization has to apply an updated license to their self-hosted installation after |
|
/// their subscription has expired. |
|
/// </summary> |
|
public const int OrganizationSelfHostSubscriptionGracePeriodDays = 60; |
|
} |
|
|
|
public static class TokenPurposes |
|
{ |
|
public const string LinkSso = "LinkSso"; |
|
} |
|
|
|
public static class AuthenticationSchemes |
|
{ |
|
public const string BitwardenExternalCookieAuthenticationScheme = "bw.external"; |
|
} |
|
|
|
public static class FeatureFlagKeys |
|
{ |
|
public const string DisplayEuEnvironment = "display-eu-environment"; |
|
public const string DisplayLowKdfIterationWarning = "display-kdf-iteration-warning"; |
|
public const string TrustedDeviceEncryption = "trusted-device-encryption"; |
|
public const string SecretsManagerBilling = "sm-ga-billing"; |
|
public const string Fido2VaultCredentials = "fido2-vault-credentials"; |
|
public const string AutofillV2 = "autofill-v2"; |
|
|
|
public static List<string> GetAllKeys() |
|
{ |
|
return typeof(FeatureFlagKeys).GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy) |
|
.Where(fi => fi.IsLiteral && !fi.IsInitOnly && fi.FieldType == typeof(string)) |
|
.Select(x => (string)x.GetRawConstantValue()) |
|
.ToList(); |
|
} |
|
}
|
|
|