Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to disable relogin?

    Hi,

    We knew how to use relogin and actually it works well in our application. Recently we started a new project that does not use the smartclient relogin. Instead of this, the new project will use App Server's authentication and we hope that if the session is expired, the App Server will open the login page to end users. We did not include the reloginFlow.js and define credentialsURL.

    We have implemented the App Server's authentication (use the Form authentication and set the Form Action to "j_security_check") but the new relogin did not work. When the session is expired, the PRC or DataSource DMI requests will be failed (it works well before the session expired).

    Line: 505
    File: ISC_DataBinding.js?isc_version=5.7.1.js

    This line:

    this.suspendTransaction(_2);if(this.loginRequired){_4.status=isc.RPCResponse.STATUS_LOGIN_REQUIRED;this.loginRequired(_1,_3,_4);return}
    var _5=this.addParamsToURL(this.credentialsURL,{ts:new Date().getTime()});this.$39j=window.open(_5,this.loginWindowSettings)},isc.A.handleLoginSuccess=function(_1){var _2=this.getTransaction(_1);if(_2.containsCredentials){this.clearTransactionTimeout(_2);var _3=_2.operations[0];if(_3.callback){var _4=this.createRPCResponse(_2,_3,{status:isc.RPCResponse.STATUS_SUCCESS});this.fireReplyCallbacks(_3,_4);this.clearTransaction(_2);return}

    We noticed the following description of "relogin":
    -----------------------------------------------------
    When session timeout occurs, typical authentication systems intercept requests to protected resources and return a page that tells the user that login is required. With a background RPC this page won't be shown to the user.
    -----------------------------------------------------

    It seems that it is hard to detect the session expiration if we do not use SmartClient relogin mechanism.

    Is it this error must occur and how to avoid it?

    Thank you.
    Last edited by landofdreams; 8 Jul 2009, 03:06.

    #2
    It does not show any messages when use IE browser if the session expired, but I got a message from Firefox.

    <SCRIPT>//'"]]>>isc_loginSuccess
    //
    // When doing relogin with a webserver-based authenticator, protect this page with it and
    // target your login attempts at this page such that when the login succeeds, this page is
    // returned.
    //
    // If you are integrating with a web service that returns a fault, paste this entire script
    // block VERBATIM into the fault text.

    while (!window.isc && document.domain.indexOf(".") != -1) {
    try {
    parent.isc;
    break;
    } catch (e) {
    document.domain = document.domain.replace(/.*?\./, '');
    }
    }

    var isc = top.isc ? top.isc : window.opener ? window.opener.isc : null;
    if (isc) isc.RPCManager.delayCall("handleLoginSuccess", [window]);
    </SCRIPT>

    Comment


      #3
      See the docs - sending back the loginRequired snippet causes RPCManager.loginRequired() to be invoked. relogin.js just provides a default implementation of what to do in this case - if you want to instead redirect to a login page just override loginRequired and do window.location.replace(newURL).

      Comment

      Working...
      X