Results 1 to 3 of 3

Thread: Concurrent Login in ASP Environment

  1. #1
    Join Date
    Aug 2004
    Posts
    18

    Default Concurrent Login in ASP Environment

    I have an ASPed application. Each subscriber elects (and can change it at any time) how many of its users it wants to be able to concurrently access the application; the subscriber is billed based upon the elected number of such concurrent accesses. Access beyond the elected number is to be denied.

    Can someone please guide me on how Acegi can help me manage this feature. Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    To begin with I presume you don't want a username being able to login more than once, as that would defeat your licensing model. See these links for details of concurrent session support:

    http://forum.springframework.org/viewtopic.php?t=4289
    http://acegisecurity.sourceforge.net...ncurrent-login

    Definitely your simplest licensing scenerio would be "named users". ie a subscriber says, "I will pay for these 3 users (Bob, Mary, Jane) to access the application". A named user model can be enforced out-of-the-box using the above concuirrent session support.

    Alternatively, I think you're asking how to do "concurrent users". ie a subcriber says, "I will pay for at most up to 3 users to access the application, but any of my users are allowed to do so". Acegi Security does not offer direct support for this. Your best bet would be build a new ConcurrentSessionController implementation, as it provides two methods that are invoked during the ProviderManager authentication process:

    Code:
    public interface ConcurrentSessionController {
        void afterAuthentication(Authentication initialAuth, Authentication result) throws AuthenticationException;
        void beforeAuthentication(Authentication initialAuth) throws AuthenticationException;
    }
    As such, you can maintain a simple HttpSession map keyed a subscriberId. If they exceed their (presumably RDBMS-defined) concurrent user limit, the ConcurrentSessionViolationException can be thrown.

    This capability is actually interesting in that others might find it beneficial. I'll mention it on the other forum thread about concurrent session support. We might be able to accommodate it as part of refactoring to that class.

  3. #3
    Join Date
    Aug 2004
    Posts
    18

    Default

    Ben

    Thanks for the guidance. I'll wait a little while to see if you incorporate my desired model in Acegi before I attempt my own implementation along the lines you suggested.

Similar Threads

  1. System configuration per environment
    By kbaum in forum Architecture
    Replies: 20
    Last Post: Sep 29th, 2009, 04:06 PM
  2. Replies: 5
    Last Post: Aug 15th, 2006, 08:40 AM
  3. acegi + CAS going in loop after login
    By mcecca in forum Security
    Replies: 3
    Last Post: Sep 30th, 2005, 02:56 PM
  4. Environment Variables in Spring?
    By dleal in forum Data
    Replies: 4
    Last Post: Aug 9th, 2005, 04:58 PM
  5. Acegi - Login Tapestry
    By john017 in forum Security
    Replies: 1
    Last Post: Feb 4th, 2005, 01:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •