AnsweredAssumed Answered

bypass signin with hardcoded credentials

Question asked by jeff.pace on Mar 28, 2014
Latest reply on Mar 28, 2014 by jeff.pace
Using token managed security, trying to bypass login with hardcoded credentials for intranet users. For some reason, even though the token comes back clean and the credential object is created, the login box still pops up? Shouldn't the IdentityManager know a token has been created and use it? I thought that is what the did

                            function initPredefinedSecurity() {
//alert('in initPredefinedSecurity');
                                serverInfo = new ServerInfo();
                                serverInfo.server = '';
                                serverInfo.tokenServiceUrl = '';
                                serverInfo.shortLivedTokenValidity = 720;
                                var def =, {"username": "util", "password": "util"});

                                def.addCallback(lang.hitch(this, function (tokenInfo) {
    //var idBase = new IdentityManagerBase();
           //get token creation time in epoch
                                var creationTime = (new Date).getTime();
                                                //calculate the token expiration based on short lived token validity
                                var expirationTime = creationTime + (serverInfo.shortLivedTokenValidity * 60000);
                                                //create array of secured services 
                                var idObject ={};
                                idObject.serverInfos= [serverInfo];
                                var credentials={};
                                credentials.userId = "util";
                                credentials.server = "";
                                credentials.token = tokenInfo.token;
                                credentials.expires = expirationTime;
                                credentials.ssl = true;
                                credentials.creationTime = creationTime;
                                idObject.credentials = [credentials];
                               //credential object is correct
                                //sign in dialog pops up