Main Content

Magnolia Community Forums: Development: magnolia cms run from only one browser


  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    magnolia cms run from only one browser
    #1 by nirjon1001 on Jun 11, 2017 5:09:48 PM

    I want my magnolia website to be run only from one browser at a time so that client cant have multiple access point from the same computer. Is this possible in magnolia? thanks

  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    Re: magnolia cms run from only one browser
    #2 by nirjon1001 on Jun 12, 2017 2:29:08 PM

    I look forward to hearing hints from you soon!

  • cmeier
    cmeier
    Full name: Christoph Meier
    Posts: 212
    Last post: Oct 19, 2017 6:08:59 PM
    Re: magnolia cms run from only one browser
    #3 by cmeier on Jun 12, 2017 4:06:05 PM

    Hello nirjon

    To be honest, i do not really understand your question.

    The website never will be run by a browser.
    You can ACCESS the website WITH the browser.
    But it is run by a server.

    So ... what was your question?

  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    Re: magnolia cms run from only one browser
    #4 by nirjon1001 on Jun 12, 2017 4:14:50 PM

    sorry that you cant get my question. I want clients to access my website from only machine at a time. For example, you cant have two live sessions from two different browsers on the same time using the same credentials. Hope it hepls

  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    Re: magnolia cms run from only one browser
    #5 by nirjon1001 on Jun 12, 2017 4:17:32 PM

    sorry that you cant get my question. I want clients to access my website from only machine at a time. For example, you cant have two live sessions running from two different browsers at the same time using the same credentials. Hope it helps.

  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    Re: magnolia cms run from only one browser
    #6 by nirjon1001 on Jun 12, 2017 4:18:05 PM

    sorry that you cant get my question. I want clients to access my website from only one machine at a time. For example, you cant have two live sessions running from two different browsers at the same time using the same credentials. Hope it helps.

  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    Re: magnolia cms run from only one browser
    #7 by nirjon1001 on Jun 12, 2017 4:18:28 PM

    is there any way to edit my question?

  • cmeier
    cmeier
    Full name: Christoph Meier
    Posts: 212
    Last post: Oct 19, 2017 6:08:59 PM
    Re: magnolia cms run from only one browser
    #8 by cmeier on Jun 12, 2017 4:23:46 PM

    >> I want clients to access my website from only machine at a time <<
    On the public context or on the author context?

    Per default the session-ID is bound to a cookie. (default Java webapp session handling).

    If you want / need to access more than one session from the same machine, you can must make sure that your distinct browser windows get distinct sessions.
    This topic is not really related to Magnolia.
    For instance you can access one with Firefox and access the other with chrome or safari.
    And i'm sure there are other ways to achieve this goal.

    I hope, but i am not sure whether this helps you.
    Still not sure whether i got your issue / use case.
    Also not sure where the Magnolia specific context is.

  • cmeier
    cmeier
    Full name: Christoph Meier
    Posts: 212
    Last post: Oct 19, 2017 6:08:59 PM
    Re: magnolia cms run from only one browser
    #9 by cmeier on Jun 12, 2017 4:24:28 PM

    Unfortunately you cannot edit your question.
    But you can repeat it in a new posting.

  • nirjon1001
    nirjon1001
    Full name: nirjon nirjon
    Posts: 11
    Last post: Jun 14, 2017 4:58:27 PM
    Registered on: Jun 11, 2017
    Re: magnolia cms run from only one browser
    #10 by nirjon1001 on Jun 12, 2017 4:39:39 PM

    Thank you so much for your time. I think its related to magnolia. I want magnolia to prevent multiple login using the same username and password. if it happens on the same machine using different browsers, then I think we need to do something with users sessions. How can I implement this feature in magnolia. what would happen, if the same user login to the system from different machines.

  • apchelintcev
    apchelintcev
    Full name: Aleksandr Pchelintcev
    Posts: 5
    Last post: Jun 13, 2017 3:19:00 PM
    Re: magnolia cms run from only one browser
    #11 by apchelintcev on Jun 13, 2017 3:19:00 PM

    @nirjon1001 what you are askings isn't entirely trivial but seems to be doable theoretically. I would approach it in a following fashion:

    1. implement an http session listener (http session listener). Collect the live http session into a map/collection which you would access from other places later.
    2. create a custom servlet filter which would kick in somewhere after the login filter. Upon that time you can be sure that you can try to get the security subject from the current session (can be accessed by the attr key "javax.security.auth.Subject" from the session itself or via MgnlContext#getSubject() iirc). Then you can iterate over the live sessions from the collection/map from step one and invalidate all the sessions whose Subject is the same as the current one, which will kick all the other browser sessions.

    Re: same/different machine cases - I don't think it matters, as far as app server is concerned that should be treated the same way.

    I hope this helps and good luck!

    --
    sasha

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/