[progress Communities] [progress Openedge Abl] Forum Post: Re: A Simple Authentication...

  • Thread starter Thread starter teppo_55
  • Start date Start date
Status
Not open for further replies.
T

teppo_55

Guest
Hello. I have used the CRUD Example from Progress as a model. My comments are after "=>". ---------------------------------- In the code I have: promise = app.jsdosession.login(this.get("username"), this.get("password")); alert($(username).val()); alert($(password).val()); => username and password are correctly set. promise.done( function( jsdosession, result, info ) { try { console.log("Success on login()"); that.set("isLoggedIn", true); app.viewModels.loginViewModel.loginViewTitle = app.viewModels.loginViewModel.logoutLabel; app.viewModels.loginViewModel.onBeforeShow( ); var catPromise = jsdosession.addCatalog(jsdoSettings.catalogURIs); catPromise.done( function( jsdosession, result, details ) { console.log("Success on addCatalog()"); if (!app.isAnonymous() && app.viewModels.loginViewModel) { app.viewModels.loginViewModel.onBeforeShow(); app.changeTitle(app.viewModels.loginViewModel.logoutLabel); } }); catPromise.fail( function( jsdosession, result, details) { app.viewModels.loginViewModel.addCatalogErrorFn(app.jsdosession, progress.data.Session.GENERAL_FAILURE, details); }); } catch(ex) { details = [{"catalogURI": jsdoSettings.catalogURIs, errorObject: ex}]; app.viewModels.loginViewModel.addCatalogErrorFn(app.jsdosession, progress.data.Session.GENERAL_FAILURE, details); } }); --------------------------------- From Console log: Success on login() => login is done correctly. GET http://88.113.172.165:8810/hhMobile/rest/_oeping?_ts=146052789-6424316385-2 401 (Unauthorized) progress.jsdo.js:9402 => I think this is not crucial. Default ping target not available, will use loginTarget instead. GET http://88.113.172.165:8810/hhMobile/static/mobile/hhMobileService.json 401 (Unauthorized) loginViewModel.js:130 Error on addCatalog() => This is crucial, and I cannot use the application. result for http://88.113.172.165:8810/hhMobile/static/mobile/hhMobileService.json: 2 null loginViewModel.js:99 Success on logout() => So because I cannot addCatalog, I cannot login. ------------------------------------------- As you can see, at the moment of addCatalog() I am logged in, but I cannot addCatalog. Regards - teppo ---------------------------|-------------------- Teppo Määttänen____| TR-Tiimi Oy Consultant_________| Struerintie 1 teppo @ trtiimi.fi____| 30100 FORSSA int-358-50-5748 226 | www.trtiimi.fi ---------------------------|--------------------

Continue reading...
 
Status
Not open for further replies.
Back
Top