• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Session Control with multiple browser window sessions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session Control with multiple browser window sessions

    Hi Guys,

    Without giving away the secrets of how you implement session control, do you think it would be possible in future to allow one user to sign in Valence in one browser session/window and another user in another window session? Currently, signing out of one Valence session/window kills the session in the other also.

    The use case on this is for shared workstation. We have shop floor maintenance department with several guys working each shift. Today, each opens a 5250 session with their i5 creds so they can use/report time in our Maint Work Order system. Currently there would be no way to implement that I can see.

    The other use case is multi monitor support, which we are going to on floor with Valence implementation. One browser window would be used for each floor guy to sign in with unique creds for Prod Entry, the other browser window could use generic creds to run dashboard/messaging type apps which don't require user specific creds.

    Ideally, each browser window could sign in to Valence with different creds and session support would work independently.

  • #2
    Hi Terry,

    You can accomplish this by adding some custom logic to the Hook.js login event method. The Hook.js resides in your Valence instance resources/desktop.

    Below is an example of forcing each tab to have its own unique session.

    Code:
    /**
     * @event login
     * Fired after the user is successfully logged in.
     *
     * @param {String} user User id
     * @param {String} sid Session id
     *
     */
    login : function (user, sid) {
        // remove localstorage and place sid in session sessionStorage
        // this will force login on each browser tab
        //
        localStorage.removeItem('sid');
        sessionStorage.setItem('sid', sid);
    }

    Comment


    • #3
      Good grief. Just when I think you guys can't do something right now, you always surprise me. Works like a charm Johnny. Thanks!

      Comment

      Working...
      X