[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java
User: starksm Date: 02/04/08 21:13:02 Modified:src/main/org/jboss/security/auth/spi Tag: Branch_2_4 AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java Log: Merge the changes from 3.0 into 2.4 Revision ChangesPath No revision No revision 1.1.4.4 +3 -3 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.1.4.3 retrieving revision 1.1.4.4 diff -u -r1.1.4.3 -r1.1.4.4 --- AbstractServerLoginModule.java29 Dec 2001 04:32:45 - 1.1.4.3 +++ AbstractServerLoginModule.java9 Apr 2002 04:13:01 - 1.1.4.4 @@ -1,5 +1,5 @@ /* - * JBoss, the OpenSource EJB server + * JBoss, the OpenSource WebOS * * Distributable under LGPL license. * See terms of license at gnu.org. @@ -51,8 +51,8 @@ * /pre * *@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 - *@author [EMAIL PROTECTED] - *@version $Revision: 1.1.4.3 $ + *@author [EMAIL PROTECTED] + *@version $Revision: 1.1.4.4 $ */ public abstract class AbstractServerLoginModule implements LoginModule { 1.1.2.2 +44 -43 jbosssx/src/main/org/jboss/security/auth/spi/AnonLoginModule.java Index: AnonLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AnonLoginModule.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- AnonLoginModule.java 9 Jul 2001 08:49:37 - 1.1.2.1 +++ AnonLoginModule.java 9 Apr 2002 04:13:01 - 1.1.2.2 @@ -1,43 +1,44 @@ -/* - * JBoss, the OpenSource EJB server - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package org.jboss.security.auth.spi; - -import java.security.Principal; -import java.security.acl.Group; -import javax.security.auth.login.LoginException; - -import org.jboss.security.SimpleGroup; -import org.jboss.security.auth.spi.UsernamePasswordLoginModule; - -/** A simple login module that simply allows for the specification of the - identity of unauthenticated users via the unauthenticatedIdentity property - inherited from the - - - @author [EMAIL PROTECTED] - @version $Revision: 1.1.2.1 $ - */ -public class AnonLoginModule extends UsernamePasswordLoginModule -{ - /** Override to return an empty Roles set. -@return an array comtaning an empty 'Roles' Group. -*/ - protected Group[] getRoleSets() throws LoginException - { - SimpleGroup roles = new SimpleGroup(Roles); - Group[] roleSets = {roles}; - return roleSets; - } - - /** Overriden to return null. -@return null always -*/ - protected String getUsersPassword() throws LoginException - { - return null; - } -} +/* + * JBoss, the OpenSource WebOS + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ + +package org.jboss.security.auth.spi; + +import java.security.acl.Group; +import javax.security.auth.login.LoginException; + +import org.jboss.security.SimpleGroup; +import org.jboss.security.auth.spi.UsernamePasswordLoginModule; + +/** + * A simple login module that simply allows for the specification of the + * identity of unauthenticated users via the unauthenticatedIdentity property. + * + * @author [EMAIL PROTECTED] + * @version $Revision: 1.1.2.2 $ + */ +public class AnonLoginModule extends UsernamePasswordLoginModule +{ + /** +* Override to return an empty Roles set. +* @return an array comtaning an empty 'Roles' Group. +*/ + protected Group[] getRoleSets() throws LoginException + { + SimpleGroup roles = new SimpleGroup(Roles); + Group[] roleSets = {roles}; + return roleSets; + } + + /** +* Overriden to return null. +* @return null always +*/ + protected String getUsersPassword() throws LoginException + { + return null; + } +} 1.2.4.4 +25 -20 jbosssx/src/main/org/jboss/security/auth/spi/DatabaseServerLoginModule.java Index: DatabaseServerLoginModule.java === RCS file:
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java
User: starksm Date: 02/02/08 15:56:47 Modified:src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java Log: Synch with changes in the 2.4 branch Revision ChangesPath 1.6 +74 -77 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AbstractServerLoginModule.java19 Dec 2001 02:29:39 - 1.5 +++ AbstractServerLoginModule.java8 Feb 2002 23:56:47 - 1.6 @@ -1,10 +1,9 @@ /* - * JBoss, the OpenSource EJB server + * JBoss, the OpenSource WebOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ - package org.jboss.security.auth.spi; import java.util.*; @@ -13,15 +12,19 @@ import java.security.Principal; import java.security.acl.Group; import javax.security.auth.Subject; +import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.NameCallback; +import javax.security.auth.callback.PasswordCallback; +import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.LoginException; +import javax.security.auth.login.FailedLoginException; import javax.security.auth.spi.LoginModule; +import org.jboss.logging.Logger; import org.jboss.security.NestableGroup; import org.jboss.security.SimpleGroup; -import org.jboss.logging.Logger; - /** * This class implements the common functionality required for a JAAS * server side LoginModule and implements the JBossSX standard Subject usage @@ -48,8 +51,8 @@ * /pre * *@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 - *@author [EMAIL PROTECTED] - *@version $Revision: 1.5 $ + *@author [EMAIL PROTECTED] + *@version $Revision: 1.6 $ */ public abstract class AbstractServerLoginModule implements LoginModule { @@ -57,14 +60,12 @@ protected CallbackHandler callbackHandler; protected Map sharedState; protected Map options; - + protected Logger log; + /** Flag indicating if the shared credential should be used */ protected boolean useFirstPass; - - protected final Logger log = Logger.getLogger(getClass().getName()); - + //--- Begin LoginModule interface methods - /** * Initialize the login module. This stores the subject, callbackHandler * and sharedState and options for the login session. Subclasses should override @@ -89,98 +90,100 @@ this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; - + log = Logger.getLogger(getClass()); + log.trace(initialize); /* Check for password sharing options. Any non-null value for password_stacking sets useFirstPass as this module has no way to validate any shared password. */ - String passwordStacking = (String)options.get(password-stacking); - if(passwordStacking != null passwordStacking.equalsIgnoreCase(useFirstPass)) + String passwordStacking = (String) options.get(password-stacking); + if( passwordStacking != null passwordStacking.equalsIgnoreCase(useFirstPass) ) useFirstPass = true; } - - /** -* Looks for javax.security.auth.login.name and javax.security.auth.login.password -* values in the sharedState map if the useFirstPass option was true and returns -* true if they exist. If they do not or are null this method returns false. + + /** Looks for javax.security.auth.login.name and javax.security.auth.login.password +values in the sharedState map if the useFirstPass option was true and returns +true if they exist. If they do not or are null this method returns false. */ public boolean login() throws LoginException { - // If useFirstPass is true, look for the shared password - if(useFirstPass == true) + log.trace(login); + // If useFirstPass is true, look for the shared password + if( useFirstPass == true ) { try { Object identity = sharedState.get(javax.security.auth.login.name); Object credential =
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java
User: starksm Date: 01/12/28 20:32:45 Modified:src/main/org/jboss/security/auth/spi Tag: Branch_2_4 AbstractServerLoginModule.java Log: Clean up the tests Revision ChangesPath No revision No revision 1.1.4.3 +50 -32 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -u -r1.1.4.2 -r1.1.4.3 --- AbstractServerLoginModule.java2001/12/09 00:55:21 1.1.4.2 +++ AbstractServerLoginModule.java2001/12/29 04:32:45 1.1.4.3 @@ -25,25 +25,34 @@ import org.jboss.security.NestableGroup; import org.jboss.security.SimpleGroup; -/** This class implements the common functionality required for a JAAS - server side LoginModule and implements the JBossSX standard Subject usage - pattern of storing identities and roles. Subclass this module to create your - own custom LoginModule and override the getRoles() and getIdentity() - methods. - - You may also wish to override - public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) - - In which case the first line of your initialize() method should be: - super.initialize(subject, callbackHandler, sharedState, options); - You may also wish to override - public boolean login() throws LoginException - In which case the last line of your login() method should be - return super.login(); - - @author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 - @author [EMAIL PROTECTED] - @version $Revision: 1.1.4.2 $ +/** + * This class implements the common functionality required for a JAAS + * server side LoginModule and implements the JBossSX standard Subject usage + * pattern of storing identities and roles. Subclass this module to create your + * own custom LoginModule and override the login(), getRoleSets() and getIdentity() + * methods. + * p + * You may also wish to override + * pre + *public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) + * /pre + * In which case the first line of your initialize() method should be: + * pre + *super.initialize(subject, callbackHandler, sharedState, options); + * /pre + * p + * You may also wish to override + * pre + *public boolean login() throws LoginException + * /pre + * In which case the last line of your login() method should be + * pre + *return super.login(); + * /pre + * + *@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 + *@author [EMAIL PROTECTED] + *@version $Revision: 1.1.4.3 $ */ public abstract class AbstractServerLoginModule implements LoginModule { @@ -56,15 +65,24 @@ /** Flag indicating if the shared credential should be used */ protected boolean useFirstPass; - //--- Begin LoginModule interface methods - /** Initialize the login module. This stores the subject, callbackHandler -and sharedState and options for the login session. -@param options, -@option -@option password-stacking: if true, the login identity will be taken from the -javax.security.auth.login.name value of the sharedState map, and -the proof of identity from the javax.security.auth.login.password -value sharedState map. +//--- Begin LoginModule interface methods + /** +* Initialize the login module. This stores the subject, callbackHandler +* and sharedState and options for the login session. Subclasses should override +* if they need to process their own options. A call to super.initialize(...) +* must be made in the case of an override. +* p +* The options are checked for the empassword-stacking/em parameter. +* If this is set to useFirstPass, the login identity will be taken from the +* codejavax.security.auth.login.name/code value of the sharedState map, +* and the proof of identity from the +* codejavax.security.auth.login.password/code value of the sharedState map. +* +* @param subject the Subject to update after a successful login. +* @param callbackHandler the CallbackHandler that will be used to obtain the +*the user identity and credentials. +* @param sharedState a Map shared between all configured login module instances +* @param options the parameters passed to the login module. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { @@ -74,10 +92,10 @@ this.options = options; log =
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java
User: luke_t Date: 01/12/18 18:29:39 Modified:src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java Log: added jboss logger Revision ChangesPath 1.5 +9 -6 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AbstractServerLoginModule.java2001/12/17 00:47:22 1.4 +++ AbstractServerLoginModule.java2001/12/19 02:29:39 1.5 @@ -20,6 +20,8 @@ import org.jboss.security.NestableGroup; import org.jboss.security.SimpleGroup; +import org.jboss.logging.Logger; + /** * This class implements the common functionality required for a JAAS * server side LoginModule and implements the JBossSX standard Subject usage @@ -47,7 +49,7 @@ * *@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 *@author [EMAIL PROTECTED] - *@version $Revision: 1.4 $ + *@version $Revision: 1.5 $ */ public abstract class AbstractServerLoginModule implements LoginModule { @@ -59,6 +61,8 @@ /** Flag indicating if the shared credential should be used */ protected boolean useFirstPass; + protected final Logger log = Logger.getLogger(getClass().getName()); + //--- Begin LoginModule interface methods /** @@ -118,7 +122,6 @@ e.printStackTrace(); } } - return false; } @@ -152,7 +155,7 @@ subjectGroup.addMember(tmp); subjectGroup = tmp; } -// Copy the group members to the Subject group + // Copy the group members to the Subject group Enumeration members = group.members(); while(members.hasMoreElements()) { @@ -178,11 +181,11 @@ */ public boolean logout() throws LoginException { -// Remove the user identity + // Remove the user identity Principal identity = getIdentity(); Set principals = subject.getPrincipals(); principals.remove(identity); -// Remove any added Groups... + // Remove any added Groups... return true; } //--- End LoginModule interface methods @@ -233,7 +236,7 @@ break; } } - // If we did not find a group create one + // If we did not find a group create one if(roles == null) { roles = new NestableGroup(name); ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsersRolesLoginModule.java
David Jencks wrote: Are you using an automated code formatter? If so what is it? I'm using Together's formatting. It has a few irritations - like some things it insists on changing and you can't tell it to leave them as they are. I added the tags in the javadoc myself obviously :). Why, has it screwed up somewhere? Luke. Log: improved javadoc and applied jboss-style code template -- Luke Taylor. Monkey Machine Ltd. PGP Key ID: 0x57E9523Chttp://www.mkeym.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsersRolesLoginModule.java
On 2001.12.17 10:31:27 -0500 Luke Taylor wrote: David Jencks wrote: Are you using an automated code formatter? If so what is it? I'm using Together's formatting. It has a few irritations - like some things it insists on changing and you can't tell it to leave them as they are. I added the tags in the javadoc myself obviously :). Why, has it screwed up somewhere? No, actually I didn't look very hard at the results, I'm just on the lookout for better tools. I used the JavaStyle ant plugin that used to come with ejbdoclet for a while, but people complained about the results and it doesn't seem to be in xdoclet. Now I'm using jde + emacs but I haven't found a way to reformat automatically. Thanks david jencks Luke. Log: improved javadoc and applied jboss-style code template -- Luke Taylor. Monkey Machine Ltd. PGP Key ID: 0x57E9523Chttp://www.mkeym.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.jav
On 2001.12.17 12:12:28 -0500 Adam Heath wrote: On Mon, 17 Dec 2001, David Jencks wrote: No, actually I didn't look very hard at the results, I'm just on the lookout for better tools. I used the JavaStyle ant plugin that used to come with ejbdoclet for a while, but people complained about the results and it doesn't seem to be in xdoclet. Now I'm using jde + emacs but I haven't found a way to reformat automatically. How nice is JavaStyle? I'm looking for some highly configurable command line java formatter, for use with cvs integration here at work. I can't find any free ones, and I don't have time right now to write my own. GNU indent almost works, but barfs on throws clauses. And astyle is barely configurable. I thought javastyle did pretty well. As I recall it comes with jedit, but I never figured out how to use it with jedit. I think you can still get the ant task from ejbdoclet. I put a file in cvs at jboss-all/build/etc/.Refactory/pretty.settings that I think matches the jboss coding style pretty well. david jencks ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsersRolesLoginModule.java
User: luke_t Date: 01/12/16 16:47:23 Modified:src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsersRolesLoginModule.java Log: improved javadoc and applied jboss-style code template Revision ChangesPath 1.4 +208 -183 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AbstractServerLoginModule.java2001/11/24 21:52:33 1.3 +++ AbstractServerLoginModule.java2001/12/17 00:47:22 1.4 @@ -4,6 +4,7 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ + package org.jboss.security.auth.spi; import java.util.*; @@ -19,201 +20,225 @@ import org.jboss.security.NestableGroup; import org.jboss.security.SimpleGroup; -/** This class implements the common functionality required for a JAAS -server side LoginModule and implements the JBossSX standard Subject usage -pattern of storing identities and roles. Subclass this module to create your -own custom LoginModule and override the login(), getRoleSets() and getIdentity() -methods. - -You may also wish to override -public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) - -In which case the first line of your initialize() method should be: -super.initialize(subject, callbackHandler, sharedState, options); -You may also wish to override -public boolean login() throws LoginException -In which case the last line of your login() method should be -return super.login(); - -@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 -@author [EMAIL PROTECTED] -@version $Revision: 1.3 $ -*/ +/** + * This class implements the common functionality required for a JAAS + * server side LoginModule and implements the JBossSX standard Subject usage + * pattern of storing identities and roles. Subclass this module to create your + * own custom LoginModule and override the login(), getRoleSets() and getIdentity() + * methods. + * p + * You may also wish to override + * pre + *public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) + * /pre + * In which case the first line of your initialize() method should be: + * pre + *super.initialize(subject, callbackHandler, sharedState, options); + * /pre + * p + * You may also wish to override + * pre + *public boolean login() throws LoginException + * /pre + * In which case the last line of your login() method should be + * pre + *return super.login(); + * /pre + * + *@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 + *@author [EMAIL PROTECTED] + *@version $Revision: 1.4 $ + */ public abstract class AbstractServerLoginModule implements LoginModule { -protected Subject subject; -protected CallbackHandler callbackHandler; -protected Map sharedState; -protected Map options; + protected Subject subject; + protected CallbackHandler callbackHandler; + protected Map sharedState; + protected Map options; -/** Flag indicating if the shared credential should be used */ -protected boolean useFirstPass; + /** Flag indicating if the shared credential should be used */ + protected boolean useFirstPass; //--- Begin LoginModule interface methods -/** Initialize the login module. This stores the subject, callbackHandler -and sharedState and options for the login session. Subclasses should override -if they need to process their own options. A call to super.initialize(...) -must be made in the case of an override. -@param subject, the Subject to update after a successful login. -@param callbackHandler, the CallbackHandler that will be used to obtain the -the user identity and credentials. -@param sharedState, a Map shared between all configured login module instances -@param options, -@option password-stacking: if true, the login identity will be taken from the -javax.security.auth.login.name value of the sharedState map, and -the proof of identity from the javax.security.auth.login.password -value of the sharedState map. -*/ -public void initialize(Subject subject, CallbackHandler callbackHandler, Map
Re: [JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsersRolesLoginModule.java
Are you using an automated code formatter? If so what is it? thanks david jencks On 2001.12.16 19:47:23 -0500 Luke Taylor wrote: User: luke_t Date: 01/12/16 16:47:23 Modified:src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java AnonLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java ProxyLoginModule.java SimpleServerLoginModule.java UsersRolesLoginModule.java Log: improved javadoc and applied jboss-style code template ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java
User: starksm Date: 01/12/08 16:55:21 Modified:src/main/org/jboss/security/auth/spi Tag: Branch_2_4 AbstractServerLoginModule.java Log: Update org.jboss.security.Logger to be in synch with the 3.0 org.jboss.system.BootstrapLogger version and update the Logger users. Revision ChangesPath No revision No revision 1.1.4.2 +2 -2 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -u -r1.1.4.1 -r1.1.4.2 --- AbstractServerLoginModule.java2001/10/19 23:50:08 1.1.4.1 +++ AbstractServerLoginModule.java2001/12/09 00:55:21 1.1.4.2 @@ -43,7 +43,7 @@ @author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 @author [EMAIL PROTECTED] - @version $Revision: 1.1.4.1 $ + @version $Revision: 1.1.4.2 $ */ public abstract class AbstractServerLoginModule implements LoginModule { @@ -72,7 +72,7 @@ this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; - log = Logger.getInstance(getClass()); + log = Logger.getLogger(getClass()); log.trace(initialize); /* Check for password sharing options. Any non-null value for password_stacking sets useFirstPass as this module has no way to ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java DatabaseServerLoginModule.java LdapLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java
User: starksm Date: 01/10/19 16:50:08 Modified:src/main/org/jboss/security/auth/spi Tag: Branch_2_4 AbstractServerLoginModule.java DatabaseServerLoginModule.java LdapLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java Log: Update to use log4j via the org.jboss.security.Logger class Decrease logging priority to trace and debug so user auth info is not displayed by default. Revision ChangesPath No revision No revision 1.1.4.1 +184 -177 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- AbstractServerLoginModule.java2001/04/11 02:04:21 1.1 +++ AbstractServerLoginModule.java2001/10/19 23:50:08 1.1.4.1 @@ -21,199 +21,206 @@ import javax.security.auth.login.FailedLoginException; import javax.security.auth.spi.LoginModule; +import org.jboss.security.Logger; import org.jboss.security.NestableGroup; import org.jboss.security.SimpleGroup; /** This class implements the common functionality required for a JAAS -server side LoginModule and implements the JBossSX standard Subject usage -pattern of storing identities and roles. Subclass this module to create your -own custom LoginModule and override the getRoles() and getIdentity() -methods. - -You may also wish to override -public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) - -In which case the first line of your initialize() method should be: -super.initialize(subject, callbackHandler, sharedState, options); -You may also wish to override -public boolean login() throws LoginException -In which case the last line of your login() method should be -return super.login(); - -@author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 -@author [EMAIL PROTECTED] -@version $Revision: 1.1 $ -*/ + server side LoginModule and implements the JBossSX standard Subject usage + pattern of storing identities and roles. Subclass this module to create your + own custom LoginModule and override the getRoles() and getIdentity() + methods. + + You may also wish to override + public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) + + In which case the first line of your initialize() method should be: + super.initialize(subject, callbackHandler, sharedState, options); + You may also wish to override + public boolean login() throws LoginException + In which case the last line of your login() method should be + return super.login(); + + @author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 + @author [EMAIL PROTECTED] + @version $Revision: 1.1.4.1 $ + */ public abstract class AbstractServerLoginModule implements LoginModule { -protected Subject subject; -protected CallbackHandler callbackHandler; -protected Map sharedState; -protected Map options; - -/** Flag indicating if the shared credential should be used */ -protected boolean useFirstPass; - -//--- Begin LoginModule interface methods -/** Initialize the login module. This stores the subject, callbackHandler -and sharedState and options for the login session. + protected Subject subject; + protected CallbackHandler callbackHandler; + protected Map sharedState; + protected Map options; + protected Logger log; + + /** Flag indicating if the shared credential should be used */ + protected boolean useFirstPass; + + //--- Begin LoginModule interface methods + /** Initialize the login module. This stores the subject, callbackHandler +and sharedState and options for the login session. @param options, -@option -@option password-stacking: if true, the login identity will be taken from the -javax.security.auth.login.name value of the sharedState map, and -the proof of identity from the javax.security.auth.login.password -value sharedState map. -*/ -public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) -{ -this.subject = subject; -this.callbackHandler = callbackHandler; -this.sharedState = sharedState; -this.options = options; - +@option +@option password-stacking: if true, the login identity will be taken from the +javax.security.auth.login.name value of the
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java
User: starksm Date: 01/07/29 11:20:20 Modified:src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java Log: Merge changes from 2.4 Revision ChangesPath 1.2 +10 -5 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractServerLoginModule.java2001/04/11 02:04:21 1.1 +++ AbstractServerLoginModule.java2001/07/29 18:20:20 1.2 @@ -27,7 +27,7 @@ /** This class implements the common functionality required for a JAAS server side LoginModule and implements the JBossSX standard Subject usage pattern of storing identities and roles. Subclass this module to create your -own custom LoginModule and override the getRoles() and getIdentity() +own custom LoginModule and override the login(), getRoleSets() and getIdentity() methods. You may also wish to override @@ -42,7 +42,7 @@ @author a href=[EMAIL PROTECTED]Edward Kenworthy/a, 12th Dec 2000 @author [EMAIL PROTECTED] -@version $Revision: 1.1 $ +@version $Revision: 1.2 $ */ public abstract class AbstractServerLoginModule implements LoginModule { @@ -56,13 +56,18 @@ //--- Begin LoginModule interface methods /** Initialize the login module. This stores the subject, callbackHandler -and sharedState and options for the login session. +and sharedState and options for the login session. Subclasses should override +if they need to process their own options. A call to super.initialize(...) +must be made in the case of an override. +@param subject, the Subject to update after a successful login. +@param callbackHandler, the CallbackHandler that will be used to obtain the +the user identity and credentials. +@param sharedState, a Map shared between all configured login module instances @param options, -@option @option password-stacking: if true, the login identity will be taken from the javax.security.auth.login.name value of the sharedState map, and the proof of identity from the javax.security.auth.login.password -value sharedState map. +value of the sharedState map. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbosssx/src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java SimpleServerLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java
User: starksm Date: 01/04/10 19:04:21 Added: src/main/org/jboss/security/auth/spi AbstractServerLoginModule.java DatabaseServerLoginModule.java IdentityLoginModule.java LdapLoginModule.java SimpleServerLoginModule.java UsernamePasswordLoginModule.java UsersRolesLoginModule.java Log: Clean up the package structure. Revision ChangesPath 1.1 jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java Index: AbstractServerLoginModule.java === /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.security.auth.spi; import java.util.*; import java.io.*; import java.security.Principal; import java.security.acl.Group; import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.LoginException; import javax.security.auth.login.FailedLoginException; import javax.security.auth.spi.LoginModule; import org.jboss.security.NestableGroup; import org.jboss.security.SimpleGroup; /** This class implements the common functionality required for a JAAS server side LoginModule and implements the JBossSX standard Subject usage pattern of storing identities and roles. Subclass this module to create your own custom LoginModule and override the getRoles() and getIdentity() methods. You may also wish to override public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) In which case the first line of your initialize() method should be: super.initialize(subject, callbackHandler, sharedState, options); You may also wish to override public boolean login() throws LoginException In which case the last line of your login() method should be return super.login(); @author a href="[EMAIL PROTECTED]"Edward Kenworthy/a, 12th Dec 2000 @author [EMAIL PROTECTED] @version $Revision: 1.1 $ */ public abstract class AbstractServerLoginModule implements LoginModule { protected Subject subject; protected CallbackHandler callbackHandler; protected Map sharedState; protected Map options; /** Flag indicating if the shared credential should be used */ protected boolean useFirstPass; //--- Begin LoginModule interface methods /** Initialize the login module. This stores the subject, callbackHandler and sharedState and options for the login session. @param options, @option @option password-stacking: if true, the login identity will be taken from the javax.security.auth.login.name value of the sharedState map, and the proof of identity from the javax.security.auth.login.password value sharedState map. */ public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { this.subject = subject; this.callbackHandler = callbackHandler; this.sharedState = sharedState; this.options = options; /* Check for password sharing options. Any non-null value for password_stacking sets useFirstPass as this module has no way to validate any shared password. */ String passwordStacking = (String) options.get("password-stacking"); if( passwordStacking != null passwordStacking.equalsIgnoreCase("useFirstPass") ) useFirstPass = true; } /** Looks for javax.security.auth.login.name and javax.security.auth.login.password values in the sharedState map if the useFirstPass option was true and returns true if they exist. If they do not or are null this method returns false. */ public boolean login() throws LoginException { // If useFirstPass is true, look for the shared password if( useFirstPass == true ) { try { Object identity = sharedState.get("javax.security.auth.login.name"); Object credential = sharedState.get("javax.security.auth.login.password"); if( identity != null credential != null ) return true; // Else, fall through and perform the login } catch(Exception e) { // Dump the exception and continue e.printStackTrace();