-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathConstants.cs
More file actions
161 lines (146 loc) · 7.95 KB
/
Copy pathConstants.cs
File metadata and controls
161 lines (146 loc) · 7.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
using System.IO;
using System;
using System.Collections.Generic;
namespace MultiFactor.SelfService.Windows.Portal
{
public class Constants
{
public const string COOKIE_NAME = "multifactor";
public const string SESSION_EXPIRED_PASSWORD_USER_KEY = "multifactor:expired-password:user";
public const string SESSION_EXPIRED_PASSWORD_CIPHER_KEY = "multifactor:expired-password:cipher";
public const string PREAUTHENTICATION_AUTHN_SUCCEED_KEY = "multifactor:preauthentication-authn-succesd:user";
public const string PREAUTHENTICATION_IDENTITY_KEY = "multifactor:preauthentication-identity:user";
public const string TOKEN_VALIDATION = "TokenValidation:JsonWebKeySet";
public const string ENVIRONMENT_KEY = "Environment";
public const string PRODUCTION_ENV = "production";
public const string CAPTCHA_TOKEN = "responseToken";
public const string PWD_RECOVERY_COOKIE = "PSession";
public const string PWD_RENEWAL_PURPOSE = "PwdRenewal";
public const string CredentialVerificationResult = "CredentialVerificationResult";
public const string SsoClaims = "SsoClaims";
public const string LoadedLdapAttributes = "LoadedLdapAttributes";
public static readonly string WORKING_DIRECTORY = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
public static class Configuration
{
public static class General
{
public const string COMPANY_NAME = "company-name";
public const string COMPANY_DOMAIN = "company-domain";
public const string ACTIVE_DIRECTORY_2FA_GROUP = "active-directory-2fa-group";
public const string COMPANY_DOMAIN_NETBIOS_NAME = "company-domain-netbios-name";
public const string COMPANY_LOGO_URL = "company-logo-url";
public const string MULTIFACTOR_API_URL = "multifactor-api-url";
public const string MULTIFACTOR_API_KEY = "multifactor-api-key";
public const string MULTIFACTOR_API_PROXY = "multifactor-api-proxy";
public const string MULTIFACTOR_API_SECRET = "multifactor-api-secret";
public const string MULTIFACTOR_IDP_API_URL = "multifactor-idp-api-url";
public const string LOGGING_LEVEL = "logging-level";
public const string USE_ACTIVE_DIRECTORY_USER_PHONE = "use-active-directory-user-phone";
public const string USE_ACTIVE_DIRECTORY_MOBILE_USER_PHONE = "use-active-directory-mobile-user-phone";
public const string ENABLE_PASSWORD_MANAGEMENT = "enable-password-management";
public const string ALLOW_USER_UNLOCK = "allow-user-unlock";
public const string ENABLE_EXCHANGE_ACTIVE_SYNC_DEVICES_MANAGEMENT = "enable-exchange-active-sync-devices-management";
public const string USE_UPN_AS_IDENTITY = "use-upn-as-identity";
public const string LOGGING_FORMAT = "logging-format";
public const string NOTIFY_PASSWORD_EXPIRATION_DAYS_LEFT = "notify-on-password-expiration-days-left";
public const string PRE_AUTHN_MODE = "pre-authentication-method";
public const string PrivacyMode = "privacy-mode";
public const string LOAD_AD_NESTED_GROUPS = "load-active-directory-nested-groups";
public const string ACTIVE_DIRECTORY_GROUP = "active-directory-group";
public const string NESTED_GROUPS_BASE_DN = "nested-groups-base-dn";
public const string USE_ATTRIBUTE_AS_IDENTITY = "use-attribute-as-identity";
public const string TOKEN_VALIDATION = "token-validation";
public const string ENVIRONMENT_KEY = "environment";
#if DEBUG
public const string ACT_AS = "act-as";
# endif
}
public static class MultiFactorClaims
{
public const string SamlSessionId = "samlSessionId";
public const string OidcSessionId = "oidcSessionId";
public const string AdditionSsoStep = "additionSsoStep";
public const string ChangePassword = "changePassword";
public const string PasswordExpirationDate = "passwordExpirationDate";
public const string ResetPassword = "resetPassword";
public const string RawUserName = "rawUserName";
public const string UnlockUser = "unlockUser";
public const string Name = "name";
}
public static class AuthenticationClaims
{
public const string AUTHENTICATION_METHODS_REFERENCES = "amr";
public const string PASSWORD_METHOD = "pwd";
public const string KERBEROS_METHOD = "kerberos";
}
public static class SsoMasterSessionTypes
{
public const string SamlSessionType = "saml";
public const string OidcSessionType = "oidc";
}
public static class ObsoleteCaptcha
{
public const string ENABLE_GOOGLE_RECAPTCHA = "enable-google-re-captcha";
public const string GOOGLE_RECAPTCHA_KEY = "google-re-captcha-key";
public const string GOOGLE_RECAPTCHA_SECRET = "google-re-captcha-secret";
public const string REQUIRE_CAPTCHA = "require-captcha";
}
public static class Captcha
{
public const string ENABLE_CAPTCHA = "enable-captcha";
public const string CAPTCHA_TYPE = "captcha-type";
public const string CAPTCHA_KEY = "captcha-key";
public const string CAPTCHA_SECRET = "captcha-secret";
public const string REQUIRE_CAPTCHA = "require-captcha";
public const string CAPTCHA_PROXY = "captcha-proxy";
}
public static class PasswordRecovery
{
public const string ENABLE_PASSWORD_RECOVERY = "enable-password-recovery";
}
public static class SignUpGroups
{
public const string SIGN_UP_GROUPS = "sign-up-groups";
}
public static class ChangingSessionCache
{
public const string LIFETIME = "pwd-changing-session-lifetime";
public const string SIZE = "pwd-changing-session-cache-size";
}
public static class SupportInfoCache
{
public const string SUPPORT_INFO_CACHE_KEY = "multifactor:support-info";
public const long SUPPORT_INFO_CACHE_SIZE = 1024 * 1024;
}
public static class PasswordRequirements
{
public const string SECTION_NAME = "passwordRequirements";
public const string UPPER_CASE_LETTERS = "upper-case-letters";
public const string LOWER_CASE_LETTERS = "lower-case-letters";
public const string DIGITS = "digits";
public const string SPECIAL_SYMBOLS = "special-symbols";
public const string MIN_LENGTH = "min-length";
public const string MAX_LENGTH = "max-length";
public static HashSet<string> GetAllKnownConstants()
{
return new HashSet<string>
{
UPPER_CASE_LETTERS,
LOWER_CASE_LETTERS,
DIGITS,
SPECIAL_SYMBOLS,
MIN_LENGTH,
MAX_LENGTH,
};
}
}
}
public static class HttpClients
{
public const string YandexCaptcha = "yandexCaptcha";
public const string MultifactorApi = "mfApi";
public const string GoogleCaptcha = "googleCaptcha";
public const string MultifactorIdpApi = "mfIdp";
}
}
}