User: olegnitz
Date: 01/06/24 06:45:22
Modified: src/main/org/jboss/security/srp SRPRemoteServer.java
SRPServerProxy.java SRPService.java
SRPVerifierStoreService.java
Log:
System.out.println replaced with Log4j calls.
Changed way of handling of second login with the same user name:
before it was rejected, now it is accepted, but multiple users with the same name
can't work simultaneously
(this should be changed in the future).
Revision Changes Path
1.2 +5 -5 jbosssx/src/main/org/jboss/security/srp/SRPRemoteServer.java
Index: SRPRemoteServer.java
===================================================================
RCS file:
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/srp/SRPRemoteServer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SRPRemoteServer.java 2001/03/06 08:35:30 1.1
+++ SRPRemoteServer.java 2001/06/24 13:45:22 1.2
@@ -22,7 +22,7 @@
/** An implementation of the RMI SRPRemoteServerInterface interface.
@author [EMAIL PROTECTED]
-@version $Revision: 1.1 $
+@version $Revision: 1.2 $
*/
public class SRPRemoteServer extends UnicastRemoteObject implements
SRPRemoteServerInterface
{
@@ -56,7 +56,7 @@
public void setVerifierStore(SRPVerifierStore verifierStore)
{
this.verifierStore = verifierStore;
- System.out.println("setVerifierStore, "+verifierStore);
+ PkgCategory.debug("setVerifierStore, "+verifierStore);
}
public void addSRPServerListener(SRPServerListener listener)
@@ -74,7 +74,7 @@
public SRPParameters getSRPParameters(String username)
throws KeyException, RemoteException
{
-System.out.println("getSRPParameters, "+username);
+ PkgCategory.debug("getSRPParameters, "+username);
SRPParameters params = null;
try
{
@@ -107,7 +107,7 @@
public byte[] init(String username, byte[] A) throws SecurityException,
RemoteException
{
-System.out.println("init, "+username);
+ PkgCategory.debug("init, "+username);
SRPServerSession session = (SRPServerSession) sessionMap.get(username);
if( session == null )
throw new SecurityException("Failed to find active session for
username: "+username);
@@ -120,7 +120,7 @@
public byte[] verify(String username, byte[] M1) throws SecurityException,
RemoteException
{
-System.out.println("verify, "+username);
+ PkgCategory.debug("verify, "+username);
SRPServerSession session = (SRPServerSession) sessionMap.get(username);
if( session == null )
throw new SecurityException("Failed to find active session for
username: "+username);
1.2 +1 -1 jbosssx/src/main/org/jboss/security/srp/SRPServerProxy.java
Index: SRPServerProxy.java
===================================================================
RCS file:
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/srp/SRPServerProxy.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SRPServerProxy.java 2001/04/04 21:49:15 1.1
+++ SRPServerProxy.java 2001/06/24 13:45:22 1.2
@@ -20,7 +20,7 @@
to them when the SRPServerProxy is unserialized.
@author [EMAIL PROTECTED]
-@version $Revision: 1.1 $
+@version $Revision: 1.2 $
*/
public class SRPServerProxy implements InvocationHandler, Serializable
{
@@ -29,7 +29,7 @@
/** Create a SRPServerProxy given the SRPServerInterface that method
invocations are to be delegated to.
*/
- SRPServerProxy(SRPServerInterface server)
+ public SRPServerProxy(SRPServerInterface server)
{
this.server = server;
}
1.2 +5 -4 jbosssx/src/main/org/jboss/security/srp/SRPService.java
Index: SRPService.java
===================================================================
RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/srp/SRPService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SRPService.java 2001/04/04 21:49:15 1.1
+++ SRPService.java 2001/06/24 13:45:22 1.2
@@ -26,7 +26,7 @@
system described in RFC2945.
@author [EMAIL PROTECTED]
-@version $Revision: 1.1 $
+@version $Revision: 1.2 $
*/
public class SRPService extends ServiceMBeanSupport implements SRPServiceMBean,
SRPServerListener
{
@@ -101,8 +101,9 @@
synchronized( cachePolicy )
{ /* We only insert a principal if there is no current entry.
*/
- if( cachePolicy.peek(principal) == null )
- cachePolicy.insert(principal, session);
+ if( cachePolicy.peek(principal) != null )
+ cachePolicy.remove(principal);
+ cachePolicy.insert(principal, session);
}
}
catch(Exception e)
@@ -132,7 +133,7 @@
Object proxy = Proxy.newProxyInstance(loader, interfaces, proxyHandler);
InitialContext ctx = new InitialContext();
ctx.rebind(serverJndiName, proxy);
- System.out.println("Bound SRPServerProxy at "+serverJndiName);
+ PkgCategory.info("Bound SRPServerProxy at "+serverJndiName);
// The type of cache needs to be externalized...
cachePolicy = new TimedCachePolicy(1800, false, 60);
@@ -140,7 +141,7 @@
cachePolicy.start();
// Bind a reference to store using NonSerializableFactory as the
ObjectFactory
NonSerializableFactory.rebind(ctx, cacheJndiName, cachePolicy);
- System.out.println("Bound AuthenticationCache at "+cacheJndiName);
+ PkgCategory.info("Bound AuthenticationCache at "+cacheJndiName);
}
private void loadStore() throws NamingException
1.2 +3 -3
jbosssx/src/main/org/jboss/security/srp/SRPVerifierStoreService.java
Index: SRPVerifierStoreService.java
===================================================================
RCS file:
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/srp/SRPVerifierStoreService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SRPVerifierStoreService.java 2001/04/04 21:49:15 1.1
+++ SRPVerifierStoreService.java 2001/06/24 13:45:22 1.2
@@ -29,7 +29,7 @@
@see org.jboss.security.srp.SerialObjectStore
@author [EMAIL PROTECTED]
-@version $Revision: 1.1 $
+@version $Revision: 1.2 $
*/
public class SRPVerifierStoreService extends ServiceMBeanSupport implements
SRPVerifierStoreServiceMBean
{
@@ -66,7 +66,7 @@
{
store.addUser(username, password);
save();
- System.out.println("Added username: "+username);
+ PkgCategory.info("Added username: "+username);
}
catch(Exception e)
{
@@ -77,7 +77,7 @@
public void delUser(String username) throws IOException
{
store.delUser(username);
- System.out.println("Deleted username: "+username);
+ PkgCategory.info("Deleted username: "+username);
save();
}
// --- End SRPVerifierStoreServiceMBean interface methods
@@ -95,7 +95,7 @@
{
File storeFile = new File(fileName);
store = new SerialObjectStore(storeFile);
- System.out.println("Created SerialObjectStore at:
"+storeFile.getAbsolutePath());
+ PkgCategory.info("Created SerialObjectStore at:
"+storeFile.getAbsolutePath());
InitialContext ctx = new InitialContext();
// Bind a reference to store using NonSerializableFactory as the
ObjectFactory
NonSerializableFactory.rebind(ctx, jndiName, store);
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development