({
customPages,
publicServerURL,
revokeSessionOnPasswordReset,
expireInactiveSessions,
sessionLength,
defaultLimit,
maxLimit,
accountLockout,
passwordPolicy,
masterKeyIps,
masterKey,
maintenanceKey,
maintenanceKeyIps,
readOnlyMasterKey,
readOnlyMasterKeyIps,
allowHeaders,
idempotencyOptions,
fileUpload,
fileDownload,
pages,
security,
enforcePrivateUsers,
enableInsecureAuthAdapters,
schema,
requestKeywordDenylist,
allowExpiredAuthDataToken,
logLevels,
rateLimit,
databaseOptions,
extendSessionOnUse,
allowClientClassCreation,
requestComplexity,
liveQuery,
routeAllowList,
installation,
})
| 114 | } |
| 115 | |
| 116 | static validateOptions({ |
| 117 | customPages, |
| 118 | publicServerURL, |
| 119 | revokeSessionOnPasswordReset, |
| 120 | expireInactiveSessions, |
| 121 | sessionLength, |
| 122 | defaultLimit, |
| 123 | maxLimit, |
| 124 | accountLockout, |
| 125 | passwordPolicy, |
| 126 | masterKeyIps, |
| 127 | masterKey, |
| 128 | maintenanceKey, |
| 129 | maintenanceKeyIps, |
| 130 | readOnlyMasterKey, |
| 131 | readOnlyMasterKeyIps, |
| 132 | allowHeaders, |
| 133 | idempotencyOptions, |
| 134 | fileUpload, |
| 135 | fileDownload, |
| 136 | pages, |
| 137 | security, |
| 138 | enforcePrivateUsers, |
| 139 | enableInsecureAuthAdapters, |
| 140 | schema, |
| 141 | requestKeywordDenylist, |
| 142 | allowExpiredAuthDataToken, |
| 143 | logLevels, |
| 144 | rateLimit, |
| 145 | databaseOptions, |
| 146 | extendSessionOnUse, |
| 147 | allowClientClassCreation, |
| 148 | requestComplexity, |
| 149 | liveQuery, |
| 150 | routeAllowList, |
| 151 | installation, |
| 152 | }) { |
| 153 | if (masterKey === readOnlyMasterKey) { |
| 154 | throw new Error('masterKey and readOnlyMasterKey should be different'); |
| 155 | } |
| 156 | |
| 157 | if (masterKey === maintenanceKey) { |
| 158 | throw new Error('masterKey and maintenanceKey should be different'); |
| 159 | } |
| 160 | |
| 161 | this.validateAccountLockoutPolicy(accountLockout); |
| 162 | this.validatePasswordPolicy(passwordPolicy); |
| 163 | this.validateFileUploadOptions(fileUpload); |
| 164 | if (fileDownload == null) { |
| 165 | fileDownload = {}; |
| 166 | arguments[0].fileDownload = fileDownload; |
| 167 | } |
| 168 | this.validateFileDownloadOptions(fileDownload); |
| 169 | |
| 170 | if (typeof revokeSessionOnPasswordReset !== 'boolean') { |
| 171 | throw 'revokeSessionOnPasswordReset must be a boolean value'; |
| 172 | } |
| 173 |
no test coverage detected