geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers PropertiesFileLoginModule.java PropertiesFileSecurityRealm.java SQLLoginModule.java SQLSecurityRealm.java
Date Mon, 05 Jan 2004 18:56:34 GMT
djencks     2004/01/05 10:56:34

  Modified:    modules/core/src/java/org/apache/geronimo/security
                        GeronimoLoginConfiguration.java
                        LoginModuleWrapper.java
               modules/core/src/java/org/apache/geronimo/security/providers
                        PropertiesFileLoginModule.java
                        PropertiesFileSecurityRealm.java
                        SQLLoginModule.java SQLSecurityRealm.java
  Log:
  Make some constant names clearer
  
  Revision  Changes    Path
  1.4       +8 -8      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/GeronimoLoginConfiguration.java
  
  Index: GeronimoLoginConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/GeronimoLoginConfiguration.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GeronimoLoginConfiguration.java	28 Dec 2003 19:34:05 -0000	1.3
  +++ GeronimoLoginConfiguration.java	5 Jan 2004 18:56:34 -0000	1.4
  @@ -75,21 +75,21 @@
           this.securityService = securityService;
       }
   
  -    public AppConfigurationEntry[] getAppConfigurationEntry(String realm) {
  +    public AppConfigurationEntry[] getAppConfigurationEntry(String realmName) {
   
           ArrayList list = new ArrayList();
           for (Iterator iter = securityService.getRealms().iterator(); iter.hasNext();) {
  -            SecurityRealm sr = (SecurityRealm) iter.next();
  +            SecurityRealm securityRealm = (SecurityRealm) iter.next();
   
  -            if (realm.equals(sr.getRealmName())) {
  -                AppConfigurationEntry[] ace = sr.getAppConfigurationEntry();
  +            if (realmName.equals(securityRealm.getRealmName())) {
  +                AppConfigurationEntry[] appConfigurationEntries = securityRealm.getAppConfigurationEntry();
   
  -                for (int i = 0; i < ace.length; i++) {
  -                    AppConfigurationEntry entry = ace[i];
  +                for (int i = 0; i < appConfigurationEntries.length; i++) {
  +                    AppConfigurationEntry entry = appConfigurationEntries[i];
                       HashMap options = new HashMap();
   
                       options.putAll(entry.getOptions());
  -                    options.put(LoginModuleWrapper.REALM, realm);
  +                    options.put(LoginModuleWrapper.REALM_NAME, realmName);
                       options.put(LoginModuleWrapper.MODULE, entry.getLoginModuleName());
   
                       AppConfigurationEntry wrapper = new AppConfigurationEntry("org.apache.geronimo.security.LoginModuleWrapper",
  
  
  
  1.6       +4 -5      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/LoginModuleWrapper.java
  
  Index: LoginModuleWrapper.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/LoginModuleWrapper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LoginModuleWrapper.java	2 Jan 2004 04:31:44 -0000	1.5
  +++ LoginModuleWrapper.java	5 Jan 2004 18:56:34 -0000	1.6
  @@ -95,15 +95,14 @@
                   });
       }
   
  -    public final static String REALM = "org.apache.geronimo.security.LoginModuleWrapper.REALM";
  +    public final static String REALM_NAME = "org.apache.geronimo.security.LoginModuleWrapper.REALM_NAME";
       public final static String MODULE = "org.apache.geronimo.security.LoginModuleWrapper.MODULE";
  -    public final static String LOADER = "org.apache.geronimo.security.LoginModuleWrapper.LOADER";
   
   
       public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState,
Map options) {
   
           externalSubject = subject;
  -        realm = (String) options.get(REALM);
  +        realm = (String) options.get(REALM_NAME);
           try {
               final String finalClass = (String) options.get(MODULE);
               module = (LoginModule) java.security.AccessController.doPrivileged(
  @@ -140,7 +139,7 @@
           externalSubject.getPrivateCredentials().addAll(internalSubject.getPrivateCredentials());
           externalSubject.getPublicCredentials().addAll(internalSubject.getPublicCredentials());
   
  -        AccessControlContext context = (AccessControlContext)Subject.doAsPrivileged(externalSubject,
new java.security.PrivilegedAction() {
  +        AccessControlContext context = (AccessControlContext) Subject.doAsPrivileged(externalSubject,
new java.security.PrivilegedAction() {
               public Object run() {
                   return AccessController.getContext();
               }
  
  
  
  1.3       +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/PropertiesFileLoginModule.java
  
  Index: PropertiesFileLoginModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/PropertiesFileLoginModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertiesFileLoginModule.java	2 Jan 2004 04:31:44 -0000	1.2
  +++ PropertiesFileLoginModule.java	5 Jan 2004 18:56:34 -0000	1.3
  @@ -80,7 +80,7 @@
       String password;
   
       public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState,
Map options) {
  -        realm = (PropertiesFileSecurityRealm) options.get(PropertiesFileSecurityRealm.REALM);
  +        realm = (PropertiesFileSecurityRealm) options.get(PropertiesFileSecurityRealm.REALM_INSTANCE);
   
           this.subject = subject;
           this.handler = callbackHandler;
  
  
  
  1.5       +7 -9      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/PropertiesFileSecurityRealm.java
  
  Index: PropertiesFileSecurityRealm.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/PropertiesFileSecurityRealm.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PropertiesFileSecurityRealm.java	4 Jan 2004 20:40:26 -0000	1.4
  +++ PropertiesFileSecurityRealm.java	5 Jan 2004 18:56:34 -0000	1.5
  @@ -68,12 +68,10 @@
   
   import javax.security.auth.login.AppConfigurationEntry;
   
  +import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
  +import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   import org.apache.geronimo.security.AbstractSecurityRealm;
   import org.apache.geronimo.security.GeronimoSecurityException;
  -import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  -import org.apache.geronimo.kernel.service.GeronimoOperationInfo;
  -import org.apache.geronimo.kernel.service.GeronimoParameterInfo;
  -import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   import org.apache.regexp.RE;
   
   
  @@ -88,7 +86,7 @@
       Properties users = new Properties();
       Properties groups = new Properties();
   
  -    final static String REALM = "org.apache.geronimo.security.providers.PropertiesFileSecurityRealm";
  +    final static String REALM_INSTANCE = "org.apache.geronimo.security.providers.PropertiesFileSecurityRealm";
   
       public static GeronimoMBeanInfo getGeronimoMBeanInfo() throws Exception {
           GeronimoMBeanInfo mbeanInfo = new GeronimoMBeanInfo();
  @@ -203,10 +201,10 @@
       public AppConfigurationEntry[] getAppConfigurationEntry() {
           HashMap options = new HashMap();
   
  -        options.put(REALM, this);
  +        options.put(REALM_INSTANCE, this);
           AppConfigurationEntry entry = new AppConfigurationEntry("org.apache.geronimo.security.providers.PropertiesFileLoginModule",
  -                                                                AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
  -                                                                options);
  +                AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
  +                options);
           AppConfigurationEntry[] configuration = {entry};
   
           return configuration;
  
  
  
  1.5       +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLLoginModule.java
  
  Index: SQLLoginModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLLoginModule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SQLLoginModule.java	2 Jan 2004 04:31:44 -0000	1.4
  +++ SQLLoginModule.java	5 Jan 2004 18:56:34 -0000	1.5
  @@ -81,7 +81,7 @@
       String password;
   
       public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState,
Map options) {
  -        realm = (SQLSecurityRealm) options.get(SQLSecurityRealm.REALM);
  +        realm = (SQLSecurityRealm) options.get(SQLSecurityRealm.REALM_INSTANCE);
   
           this.subject = subject;
           this.handler = callbackHandler;
  
  
  
  1.4       +7 -7      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLSecurityRealm.java
  
  Index: SQLSecurityRealm.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLSecurityRealm.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SQLSecurityRealm.java	4 Jan 2004 20:40:26 -0000	1.3
  +++ SQLSecurityRealm.java	5 Jan 2004 18:56:34 -0000	1.4
  @@ -68,10 +68,10 @@
   
   import javax.security.auth.login.AppConfigurationEntry;
   
  +import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
  +import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   import org.apache.geronimo.security.AbstractSecurityRealm;
   import org.apache.geronimo.security.GeronimoSecurityException;
  -import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  -import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   import org.apache.regexp.RE;
   
   
  @@ -90,7 +90,7 @@
       HashMap users = new HashMap();
       HashMap groups = new HashMap();
   
  -    final static String REALM = "org.apache.geronimo.security.providers.SQLSecurityRealm";
  +    final static String REALM_INSTANCE = "org.apache.geronimo.security.providers.SQLSecurityRealm";
   
       public static GeronimoMBeanInfo getGeronimoMBeanInfo() throws Exception {
           GeronimoMBeanInfo mbeanInfo = new GeronimoMBeanInfo();
  @@ -270,10 +270,10 @@
       public AppConfigurationEntry[] getAppConfigurationEntry() {
           HashMap options = new HashMap();
   
  -        options.put(REALM, this);
  +        options.put(REALM_INSTANCE, this);
           AppConfigurationEntry entry = new AppConfigurationEntry("org.apache.geronimo.security.providers.SQLLoginModule",
  -                                                                AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
  -                                                                options);
  +                AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
  +                options);
           AppConfigurationEntry[] configuration = {entry};
   
           return configuration;
  
  
  

Mime
View raw message