hex encode random bytes to get session ID
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 10 Mar 2008 18:51:39 +0000 (18:51 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 10 Mar 2008 18:51:39 +0000 (18:51 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2687 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/session/impl/SessionManagerImpl.java

index daf5b91..8b94aec 100644 (file)
@@ -18,10 +18,10 @@ package edu.internet2.middleware.shibboleth.idp.session.impl;
 
 import java.security.SecureRandom;
 
+import org.apache.commons.ssl.util.Hex;
 import org.joda.time.DateTime;
 import org.opensaml.util.storage.ExpiringObject;
 import org.opensaml.util.storage.StorageService;
-import org.opensaml.xml.util.Base64;
 import org.opensaml.xml.util.DatatypeHelper;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
@@ -94,7 +94,7 @@ public class SessionManagerImpl implements SessionManager<Session>, ApplicationC
         // generate a random session ID
         byte[] sid = new byte[sessionIDSize];
         prng.nextBytes(sid);
-        String sessionID = Base64.encodeBytes(sid);
+        String sessionID = Hex.encode(sid);
 
         Session session = new SessionImpl(sessionID, principal, sessionLifetime);
         SessionManagerEntry sessionEntry = new SessionManagerEntry(this, session, sessionLifetime);
@@ -134,11 +134,11 @@ public class SessionManagerImpl implements SessionManager<Session>, ApplicationC
             return sessionEntry.getSession();
         }
     }
-    
+
     /** {@inheritDoc} */
     public Session getSessionByPrincipalName(String name) {
-        
-        //TODO
+
+        // TODO
         return null;
     }