Direct Access to parse-server (#2316)

* Adds ParseServerRESTController experimental support

* Adds basic tests

* Do not create sessionToken when requests come from cloudCode #1495
This commit is contained in:
Florent Vilmart
2016-09-09 15:18:37 -04:00
committed by GitHub
parent ccf2b14b98
commit cb7b54941b
6 changed files with 292 additions and 56 deletions

View File

@@ -436,6 +436,11 @@ RestWrite.prototype.createSessionTokenIfNeeded = function() {
}
RestWrite.prototype.createSessionToken = function() {
// cloud installationId from Cloud Code,
// never create session tokens from there.
if (this.auth.installationId && this.auth.installationId === 'cloud') {
return;
}
var token = 'r:' + cryptoUtils.newToken();
var expiresAt = this.config.generateSessionExpiresAt();