File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ const PARSE_LDAP_SERVICE_USER_DN = process.env.PARSE_LDAP_SERVICE_USER_DN || "";
3232const PARSE_LDAP_SERVICE_USER_PW = process . env . PARSE_LDAP_SERVICE_USER_PW || "" ;
3333const PARSE_LDAP_SERVICE_GROUP_DN = process . env . PARSE_LDAP_SERVICE_GROUP_DN || "" ;
3434const PARSE_LDAP_SERVICE_INTERVAL = parseInt ( process . env . PARSE_LDAP_SERVICE_INTERVAL || "" ) ;
35+ const PARSE_LDAP_EXPIRE_LENGTH = process . env . PARSE_LDAP_EXPIRE_LENGTH
36+ ? new Date ( Date . now ( ) + Number ( process . env . PARSE_LDAP_EXPIRE_LENGTH ) * 1000 )
37+ : new Date ( Date . now ( ) + 1000 * 60 * 60 * 24 * 365 ) ;
3538
3639const PARSE_LDAP_UNIFY_CREDENTIALS = process . env . PARSE_LDAP_UNIFY_CREDENTIALS === "true" ;
3740
@@ -143,7 +146,7 @@ async function init() {
143146 sessionToken,
144147 user : user_a ,
145148 restricted : false ,
146- expiresAt : new Date ( Date . now ( ) + 1000 * 60 * 60 * 24 * 365 ) ,
149+ expiresAt : PARSE_LDAP_EXPIRE_LENGTH ,
147150 installationId : request . installationId ,
148151 createdWith : {
149152 action : "login" ,
You can’t perform that action at this time.
0 commit comments