You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by David Hoffer <dh...@gmail.com> on 2014/03/23 14:34:51 UTC

Single and last login wins feature

Does Shiro support a mechanism where I can limit the number of logins per
user to 1 and the last login wins?  (Other sessions would be invalidated
and message displayed if they tried to use old sessions.)

Thanks,
-Dave

Re: Single and last login wins feature

Posted by Brian Demers <br...@gmail.com>.
Not that i'm aware of.  I have run into a similar situation after
introducing bugs into an apps session storage (my fault), so i'm guessing
it in't far off.



On Wed, Mar 26, 2014 at 10:01 AM, David Hoffer <dh...@gmail.com> wrote:

> Yeah actually I was thinking that the message would be displayed at the
> new login (that the old sessions will be invalidated) then if they should
> go back to those old sessions they just get a normal session expired
> message.  So if that's how it works...that should be fine.  Is this use
> case considered a standard feature of Shiro?
>
> -Dave
>
>
> On Mon, Mar 24, 2014 at 9:42 PM, Brian Demers <br...@gmail.com>wrote:
>
>> Take a look at the SessionManager class
>> As far as displaying a message to the user about the old session, that
>> could get a little tricky.  You would need to store old sessions around,
>> and treat them different then an invalid session id.
>>
>> You may want to display a message on login, that other sessions from this
>> user are invalidated.
>>
>>
>>
>> On Sun, Mar 23, 2014 at 9:34 AM, David Hoffer <dh...@gmail.com> wrote:
>>
>>> Does Shiro support a mechanism where I can limit the number of logins
>>> per user to 1 and the last login wins?  (Other sessions would be
>>> invalidated and message displayed if they tried to use old sessions.)
>>>
>>> Thanks,
>>> -Dave
>>>
>>
>>
>

Re: Single and last login wins feature

Posted by David Hoffer <dh...@gmail.com>.
Yeah actually I was thinking that the message would be displayed at the new
login (that the old sessions will be invalidated) then if they should go
back to those old sessions they just get a normal session expired message.
 So if that's how it works...that should be fine.  Is this use case
considered a standard feature of Shiro?

-Dave


On Mon, Mar 24, 2014 at 9:42 PM, Brian Demers <br...@gmail.com>wrote:

> Take a look at the SessionManager class
> As far as displaying a message to the user about the old session, that
> could get a little tricky.  You would need to store old sessions around,
> and treat them different then an invalid session id.
>
> You may want to display a message on login, that other sessions from this
> user are invalidated.
>
>
>
> On Sun, Mar 23, 2014 at 9:34 AM, David Hoffer <dh...@gmail.com> wrote:
>
>> Does Shiro support a mechanism where I can limit the number of logins per
>> user to 1 and the last login wins?  (Other sessions would be invalidated
>> and message displayed if they tried to use old sessions.)
>>
>> Thanks,
>> -Dave
>>
>
>

Re: Single and last login wins feature

Posted by Brian Demers <br...@gmail.com>.
Take a look at the SessionManager class
As far as displaying a message to the user about the old session, that
could get a little tricky.  You would need to store old sessions around,
and treat them different then an invalid session id.

You may want to display a message on login, that other sessions from this
user are invalidated.



On Sun, Mar 23, 2014 at 9:34 AM, David Hoffer <dh...@gmail.com> wrote:

> Does Shiro support a mechanism where I can limit the number of logins per
> user to 1 and the last login wins?  (Other sessions would be invalidated
> and message displayed if they tried to use old sessions.)
>
> Thanks,
> -Dave
>