portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1858718 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/RememberMePortalFilter.java
Date Mon, 06 May 2019 00:32:19 GMT
Author: taylor
Date: Mon May  6 00:32:19 2019
New Revision: 1858718

URL: http://svn.apache.org/viewvc?rev=1858718&view=rev
Log:
JS2-1368: RememberMe Login Filter, contribution from Giacomo Morri

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/RememberMePortalFilter.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/RememberMePortalFilter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/RememberMePortalFilter.java?rev=1858718&r1=1858717&r2=1858718&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/RememberMePortalFilter.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/RememberMePortalFilter.java
Mon May  6 00:32:19 2019
@@ -51,7 +51,6 @@ import javax.servlet.http.HttpSession;
 import javax.sql.DataSource;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.URLDecoder;
 import java.security.Principal;
 import java.sql.Connection;
@@ -59,7 +58,6 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.Statement;
 import java.util.Date;
-import java.util.Properties;
 
 /**
  * @author Giacomo Morri
@@ -245,8 +243,22 @@ public class RememberMePortalFilter impl
      *  user_token
      *  user
      *
+     *  MYSQL example:
+     *
+
+     CREATE TABLE `user_token` (
+     `id` int(11) NOT NULL AUTO_INCREMENT,
+     `userid` int(11) NOT NULL,
+     `token_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
+     `date_created` datetime NOT NULL,
+     `date_expiry` datetime NOT NULL,
+     PRIMARY KEY (`id`),
+     KEY `user_token_user_FK` (`userid`),
+     CONSTRAINT `user_token_user_FK` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE
CASCADE ON UPDATE CASCADE
+     ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Users
access tokens table';
+
      * @param token
-     * @return
+     * @return username associated with token
      */
     private String getUsernameFromAccessToken(String token) {
         String username = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message