# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package Lemonldap::NG::Common::Conf::Constants;

use strict;
use Exporter 'import';
use base qw(Exporter);

our $VERSION = '2.23.1';

# CONSTANTS

use constant CONFIG_WAS_CHANGED => -1;
use constant UNKNOWN_ERROR      => -2;
use constant DATABASE_LOCKED    => -3;
use constant UPLOAD_DENIED      => -4;
use constant SYNTAX_ERROR       => -5;
use constant DEPRECATED         => -6;
use constant DEFAULTCONFFILE => "/usr/local/lemonldap-ng/etc/lemonldap-ng.ini";
use constant DEFAULTSECTION  => "all";
use constant CONFSECTION     => "configuration";
use constant PORTALSECTION   => "portal";
use constant HANDLERSECTION  => "handler";
use constant MANAGERSECTION  => "manager";
use constant SESSIONSEXPLORERSECTION => "sessionsExplorer";
use constant APPLYSECTION            => "apply";

# Default configuration backend
use constant DEFAULTCONFBACKEND => "File";
use constant DEFAULTCONFBACKENDOPTIONS => (
    dirName => '/usr/local/lemonldap-ng/data/conf',
);
our $hashParameters = qr/^(?:(?:r(?:e(?:st(?:Pwd(?:Confirm|Modify)|2f(?:Verify|Init)|(?:Find)?UserDB|Auth)Arg|moteGlobalStorageOption|loadUrl)|adius(?:(?:2f)?RequestAttribute|ExportedVar))|l(?:o(?:ca(?:lSessionStorageOption|tionRule)|goutService)|dapExportedVar|wp(?:Ssl)?Opt)|(?:(?:d(?:emo|bi)|webID)ExportedVa|exported(?:Heade|Va)|issuerDBGetParamete)r|f(?:indUser(?:Exclud|Search)ingAttribute|acebookExportedVar)|g(?:r(?:antSessionRule|oup)|lobalStorageOption)|n(?:otificationStorageOption|ginxCustomHandler)|m(?:essageBrokerOption|acro))s|o(?:idc(?:S(?:ervice(?:DynamicRegistrationEx(?:portedVar|traClaim)s|MetaDataA(?:uthnContext|mrRules))|torageOptions)|RPMetaData(?:(?:Option(?:sExtraClaim)?|ExportedVar|ScopeRule|Macro)s|Node)|OPMetaData(?:(?:ExportedVar|Option)s|J(?:SON|WKS)|Node))|penIdExportedVars)|s(?:aml(?:S(?:PMetaData(?:(?:ExportedAttribute|Option|Macro)s|(?:UR|XM)L|Node)|torageOptions)|IDPMetaData(?:(?:ExportedAttribute|Option)s|(?:UR|XM)L|Node)|AuthnContextMapExtra)|essionDataToRemember|laveExportedVars|fExtra)|c(?:a(?:s(?:A(?:ppMetaData(?:(?:ExportedVar|Option|Macro)s|Node)|ttributes)|S(?:rvMetaData(?:(?:ExportedVar|Option)s|Node)|torageOptions))|ptchaOptions)|(?:ustom(?:Plugins|Add)Param|heckUserHiddenHeader|ombModule)s)|a(?:(?:daptativeAuthenticationLevelR|ut(?:hChoiceMod|oSigninR))ules|pplicationList)|p(?:o(?:rtal(?:CustomTplParam|SkinRule)s|st)|ersistentStorageOptions)|v(?:hostOptions|irtualHost)|S(?:MTPTLSOpts|SLVarIf)|key(?:Node|s))$/;
our $arrayParameters = qr/^mySessionAuthorizedRWKeys$/;
our $boolKeys = qr/^(?:s(?:aml(?:S(?:P(?:MetaDataOptions(?:(?:CheckS[LS]OMessageSignatur|OneTimeUs)e|Force(?:NameIDFormat|UTF8)|EnableIDPInitiatedURL|Activation)|SSODescriptor(?:WantAssertion|AuthnRequest)sSigned)|erviceUseCertificateInResponse)|IDP(?:MetaDataOptions(?:(?:Check(?:S[LS]OMessageSignatur|Audienc|Tim)|IsPassiv)e|A(?:daptSessionUtime|llowLoginFromIDP)|Force(?:Authn|UTF8)|StoreSAMLToken|RelayStateURL)|SSODescriptorWantAuthnRequestsSigned)|DiscoveryProtocol(?:Activation|IsPassive)|CommonDomainCookieActivation|UseQueryStringSpecific|MetadataForceUTF8)|t(?:ayConnected(?:SingleSession|BypassFG)|orePasswor(?:dEncrypte)?d)|f(?:RemovedUseNotif|OnlyUpgrade)|kip(?:Upgrade|Renew)Confirmation|oap(?:Session|Config)Server|laveDisplayLogo|howLanguages|slByAjax)|o(?:idc(?:RPMetaDataOptions(?:A(?:llow(?:(?:ClientCredentials|Password)Grant|NativeSso|Offline)|uth(?:nRequire(?:Nonc|Stat)|RequiredForAuthoriz)e|c(?:cessToken(?:Claims|JWT)|tivation))|(?:UserinfoRequireHeaderToke|RefreshToke(?:nRotatio)?)n|Logout(?:SessionRequired|BypassConfirm)|IDTokenForceClaims|BypassConsent|NoJwtHeader|Public)|Service(?:Allow(?:(?:AuthorizationCode|Implicit|Hybrid)Flow|OnlyDeclaredScopes)|MetaDataDisallowNoneAlg|IgnoreScopeForClaims|HideMetadata)|O(?:PMetaDataOptions(?:(?:CheckJWTSignatur|UseNonc)e|Require(?:Pkce|Iss)|StoreIDToken|NoJwtHeader)|fflineTokens)|DropCspHeaders)|ldNotifFormat)|c(?:as(?:S(?:rvMetaDataOptions(?:SamlValidate|Gateway|Renew)|trictMatching)|AppMetaDataOptionsA(?:ctivation|llowProxy)|BackChannelSingleLogout)|heck(?:DevOps(?:D(?:isplayNormalizedHeaders|ownload)|CheckSessionAttributes)?|Entropy(?:Required)?|HIBP(?:Required)?|State|User|XSS)|o(?:ntextSwitching(?:Allowed2fModifications|StopWithLogout)|mpactConf|rsEnabled)|rowdsecIgnoreFailures|da)|p(?:ortal(?:Display(?:Re(?:freshMyRights|setPassword|gister)|CertificateResetByMail|GeneratePassword|PasswordPolicy)|E(?:rrorOn(?:ExpiredSession|MailNotFound)|nablePasswordDisplay)|(?:CheckLogin|Statu)s|OpenLinkInNewWindow|ForceAuthn|AntiFrame)|roxy(?:AuthServiceImpersonation|UseSoap)|assword2fUserCanRemoveKey|ublicNotifications)|l(?:dap(?:(?:G(?:roup(?:DecodeSearchedValu|Recursiv)|etUserBeforePasswordChang)|UsePasswordResetAttribut)e|(?:AllowResetExpired|Set)Password|ChangePasswordAsUser|PpolicyControl|ITDS)|o(?:ginHistoryEnabled|cationDetect))|r(?:e(?:st(?:(?:Password|Session|Config|Auth)Server|ExportSecretKeys)|member(?:AuthChoiceForgetAtLogout|DefaultChecked)|freshSessions)|adius(?:2f(?:SendInitialRequest|MsgAuth)|MsgAuth))|i(?:ssuerDB(?:OpenID(?:Connect)?|JitsiMeetTokens|SAML|CAS|Get)Activation|mpersonationSkipEmptyValues|nitializePasswordReset)|n(?:o(?:tif(?:ication(?:Server(?:(?:POS|GE)T|DELETE)?|sExplorer)?|y(?:Deleted|Other))|AjaxHook)|ewLocationWarning)|t(?:o(?:tp2f(?:UserCanRemoveKey|EncryptSecret)|kenUseGlobalStorage)|rustedBrowserUseTotp)|u(?:se(?:Redirect(?:On(?:Forbidden|Error)|AjaxOnUnauthorized)|SafeJail)|pgradeSession)|a(?:ppAccessHistoryEnabled|uthChoiceSelectOnly|voidAssignment|ctiveTimer)|br(?:uteForceProtection(?:IncrementalTempo)?|owsersDontStorePassword)|d(?:is(?:ablePersistentStorage|playSessionId)|biDynamicHashEnabled)|(?:mai(?:lOnPasswordChang|ntenanc)|vhostMaintenanc)e|w(?:ebauthn(?:2fUserCanRemoveKey|AppId)|sdlServer)|h(?:ashedSessionStore|ideOldPassword|ttpOnly)|g(?:roupsBeforeMacros|lobalLogoutTimer)|yubikey2fUserCanRemoveKey|krb(?:RemoveDomain|ByJs)|findUser)$/;

our @sessionTypes = ( 'remoteGlobal', 'global', 'localSession', 'persistent', 'saml', 'oidc', 'cas' );

sub NO {qr/^(?:off|no|0)?$/i}

our %EXPORT_TAGS = (
    'all' => [
        qw(
          CONFIG_WAS_CHANGED
          UNKNOWN_ERROR
          DATABASE_LOCKED
          UPLOAD_DENIED
          SYNTAX_ERROR
          DEPRECATED
          DEFAULTCONFFILE
          DEFAULTSECTION
          CONFSECTION
          PORTALSECTION
          HANDLERSECTION
          MANAGERSECTION
          SESSIONSEXPLORERSECTION
          APPLYSECTION
          DEFAULTCONFBACKEND
          DEFAULTCONFBACKENDOPTIONS
          NO
          $hashParameters
          $arrayParameters
          @sessionTypes
          $boolKeys
          )
    ]
);
our @EXPORT_OK   = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT      = ( @{ $EXPORT_TAGS{'all'} } );

1;
