cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to force web-ide login page with session timing out?

chirag_maladkar
Explorer
0 Kudos

Hi

I was trying to create a simple splitapp with routing.

The problem I am facing is that if the session times out, and I click on a button whose action is to route to another view, I get a rendering error instead of getting any prompt to enter credentials.

This problem is resolved by a page refresh, but is there any way we can automate this and open SAP HANA Login page? (ex: HANA Web IDE opens up a login page when session times out).

Thanks & Regards,

Chirag

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor
0 Kudos

Hi Chirag,

Handling Session Timeout information can be found at

SAP HANA Cloud Platform

Regards,

Jamie

SAP - Technology RIG

chirag_maladkar
Explorer
0 Kudos

Thanks for the reply Jamie.
Just one question though, should it be placed in onInit of controller or in any other lifecycle function or in index.html?

jamie_cawley
Advisor
Advisor
0 Kudos

Placing it either in the oninit of the main controller or the index should be fine.  You may want to also add another listener for you model, it seems that the only the file requests rely on jquery.

I don't see anyway of checking the com.sap.cloud.security.login header in the model so you could do something like

oModel.attachRequestCompleted(function(evt) {

     if(!evt.getParameter("success")){    

          //load the index or some other small file to see if the session is active

          //ajaxComplete will check the session header

          $.ajax({ 

            "url": "/index.html"

           });

       }

  });

Regards,

Jamie

SAP - Technology RIG

Answers (0)