MCPcopy
hub / github.com/parse-community/parse-server / validateOptions

Method validateOptions

src/Config.js:116–203  ·  view source on GitHub ↗
({
    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,
  })

Source from the content-addressed store, hash-verified

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

Callers 10

constructorMethod · 0.45
putMethod · 0.45
oauth2.spec.jsFile · 0.45
linkedIn.spec.jsFile · 0.45
microsoft.spec.jsFile · 0.45
wechat.spec.jsFile · 0.45
gcenter.spec.jsFile · 0.45
twitter.spec.jsFile · 0.45
github.spec.jsFile · 0.45

Tested by

no test coverage detected