Your simply duplicating work already done in the securityManager.isValid(identity,
password)
and this is a SecurityAssociation thread specific setting and therefore a single
thread cannot obtain all logged in users.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 8:27 AM
Subject: [JBoss-dev] Question about SecurityAssociation
> Hi All,
>
> For a portal-authentication, i've written a custom LoginModule, that belongs to
> a configured Security-Realm. When login succeed,
> i want to have all logged-in users in a context, to be able i.e. query the roles
> of a users with the RealmManager. My first idea looks like this:
>
> securityManager = (JaasSecurityManager) initCtx.lookup(securityDomain);
>
> if (securityManager.isValid(identity, password)) {
>
> activeSubject = securityManager.getActiveSubject();
>
> // Propagate the user info to JBoss for any calls
> SecurityAssociation.setSubject(activeSubject);
> SecurityAssociation.setPrincipal(identity);
> SecurityAssociation.setCredential(password.toCharArray());
>
> this.isLoggedIn = true;
> return isLoggedIn;
>
> } else
> return false;
>
>
> Can i handle the login this way, i mean, can i put ALL my users into a
> "Security-Context" with "SecurityAssociation.setPrincipal(identity);", so that
> the RealmManager knows all logged-in users ?
>
> Many thanks & kind regards
> Philipp
> --
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen
> ist nicht gestattet.
>
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!
> Get cracking and register here for some mind boggling fun and
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development