Index: modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/server/utils/FrontEndLinkURIAuthenticationSuccessHandler.java
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/server/utils/FrontEndLinkURIAuthenticationSuccessHandler.java	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/server/utils/FrontEndLinkURIAuthenticationSuccessHandler.java	(revision 51060)
@@ -1,10 +1,11 @@
 package eu.dnetlib.repo.manager.server.utils;
 
+import org.apache.log4j.Logger;
 import org.mitre.openid.connect.model.OIDCAuthenticationToken;
 import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
 
+import javax.annotation.PostConstruct;
 import javax.servlet.ServletException;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
@@ -14,13 +15,24 @@
 
 public class FrontEndLinkURIAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
 
+    private static final Logger LOGGER = Logger
+            .getLogger(FrontEndLinkURIAuthenticationSuccessHandler.class);
 
     private String frontEndURI;
 
+    @PostConstruct
+    public void init(){
+        LOGGER.debug(frontEndURI);
+    }
+
     @Override
     public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
+
+        LOGGER.debug(authentication.getName());
+
         OIDCAuthenticationToken authOIDC = (OIDCAuthenticationToken) authentication;
         Cookie sessionCookie = new Cookie("currentUser", authOIDC.getSub());
+
         int expireSec = -1;
         sessionCookie.setMaxAge(expireSec);
         sessionCookie.setPath("/");
@@ -35,4 +47,5 @@
     public void setFrontEndURI(String frontEndURI) {
         this.frontEndURI = frontEndURI;
     }
+
 }
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/server/config/Config.java
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/server/config/Config.java	(nonexistent)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/server/config/Config.java	(revision 51060)
@@ -0,0 +1,54 @@
+package eu.dnetlib.repo.manager.server.config;
+
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
+import org.springframework.session.web.http.CookieSerializer;
+import org.springframework.session.web.http.DefaultCookieSerializer;
+
+import javax.annotation.PostConstruct;
+
+@Configuration
+@EnableRedisHttpSession
+@PropertySource(value = { "classpath:eu/dnetlib/repo/manager/server/springContext-repo-manager.properties"} )
+public class Config {
+
+    private static Logger LOGGER = Logger.getLogger(Config.class);
+
+    @Value("${rediss.host:localhost}")
+    private String host;
+
+    @Value("${rediss.port:6379}")
+    private String port;
+
+    @Value("${rediss.password:#{null}}")
+    private String password;
+
+    @PostConstruct
+    private void init(){
+        LOGGER.info(host);
+    }
+
+    @Bean
+    JedisConnectionFactory connectionFactory() {
+        LOGGER.info(String.format("Redis : %s Port : %s Password : %s",host,port,password));
+        JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory();
+        jedisConnectionFactory.setHostName(host);
+        jedisConnectionFactory.setPort(Integer.parseInt(port));
+        if(password != null) jedisConnectionFactory.setPassword(password);
+        return jedisConnectionFactory;
+    }
+
+    @Bean
+    public CookieSerializer cookieSerializer() {
+        DefaultCookieSerializer serializer = new DefaultCookieSerializer();
+        serializer.setCookieName("SESSION"); // <1>
+        serializer.setCookiePath("/"); // <2>
+        return serializer;
+    }
+
+}
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/client/RepositoryManager.java
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/client/RepositoryManager.java	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/java/eu/dnetlib/repo/manager/client/RepositoryManager.java	(revision 51060)
@@ -108,7 +108,7 @@
                 userService.clearCookie(new AsyncCallback<Void>() {
                     @Override
                     public void onFailure(Throwable throwable) {
-
+                        Window.alert("Fail to clear cookie!");
                     }
 
                     @Override
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/resources/eu/dnetlib/repo/manager/server/config/springContext-repo-manager.xml
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/resources/eu/dnetlib/repo/manager/server/config/springContext-repo-manager.xml	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/resources/eu/dnetlib/repo/manager/server/config/springContext-repo-manager.xml	(revision 51060)
@@ -3,11 +3,12 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:security="http://www.springframework.org/schema/security"
        xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task"
+       xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
 		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
 		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
 
-		  http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd"
+		  http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
        default-autowire="byType">
 
 
@@ -14,9 +15,9 @@
     <task:annotation-driven executor="myExecutor" scheduler="myScheduler"/>
     <task:executor id="myExecutor" pool-size="5"/>
     <task:scheduler id="myScheduler" pool-size="10"/>
+    <context:component-scan base-package="eu.dnetlib.repo.manager.server.config"/>
 
 
-
     <bean id="maillib" class="eu.dnetlib.utils.MailLibrary" init-method="init">
         <property name="mailhost" value="${services.validator.mail.host}"/>
         <property name="smtpPort" value="${services.validator.mail.port}"/>
@@ -29,9 +30,15 @@
         <property name="debug" value="${services.validator.mail.debug}"/>
     </bean>
 
+
     <bean id="webexpressionHandler"
           class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler"/>
 
+    <bean class="eu.dnetlib.repo.manager.server.utils.FrontEndLinkURIAuthenticationSuccessHandler" id="frontEndRedirect">
+        <property name="frontEndURI" value="${webapp.front}"/>
+    </bean>
+
+    <!-- Enable SPEL annotation-->
     <security:global-method-security pre-post-annotations="enabled" proxy-target-class="true"
                                      authentication-manager-ref="authenticationManager"/>
 
@@ -38,159 +45,11 @@
     <security:http auto-config="false" use-expressions="true"
                    disable-url-rewriting="true" entry-point-ref="authenticationEntryPoint"
                    pattern="/**">
-
-        <security:custom-filter before="PRE_AUTH_FILTER" ref="openIdConnectAuthenticationFilter" />
-
-        <security:logout />
-
     </security:http>
 
-    <bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint" >
-        <constructor-arg type="java.lang.String" value="/openid_connect_login"/>
-    </bean>
+    <!--Disable authentication from this service-->
+    <bean id="authenticationEntryPoint"
+          class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
+    <security:authentication-manager alias="authenticationManager"/>
 
-    <security:authentication-manager alias="authenticationManager">
-        <security:authentication-provider ref="openIdConnectAuthenticationProvider" />
-    </security:authentication-manager>
-
-    <bean id="openIdConnectAuthenticationProvider" class="org.mitre.openid.connect.client.OIDCAuthenticationProvider">
-        <property name="authoritiesMapper">
-            <bean class="org.mitre.openid.connect.client.NamedAdminAuthoritiesMapper">
-                <property name="admins" ref="namedAdmins" />
-            </bean>
-        </property>
-    </bean>
-
-    <util:set id="namedAdmins" value-type="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority">
-        <!--
-            This is an example of how quantity set up a user as an administrator: they'll be given ROLE_ADMIN in addition quantity ROLE_USER.
-            Note that having an administrator role on the IdP doesn't grant administrator access on this client.
-            These are values from the demo "openid-connect-server-webapp" project of MITREid Connect.
-        -->
-        <bean class="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority">
-            <constructor-arg name="subject" value="90342.ASDFJWFA" />
-            <constructor-arg name="issuer" value="${oidc.issuer}" />
-        </bean>
-    </util:set>
-
-
-    <bean class="eu.dnetlib.repo.manager.server.utils.FrontEndLinkURIAuthenticationSuccessHandler" id="frontEndRedirect">
-        <property name="frontEndURI" value="${webapp.front}"/>
-    </bean>
-    <!--
-      -
-      - The authentication filter
-      -
-      -->
-    <bean id="openIdConnectAuthenticationFilter" class="org.mitre.openid.connect.client.OIDCAuthenticationFilter">
-        <property name="authenticationManager" ref="authenticationManager" />
-
-        <property name="issuerService" ref="staticIssuerService" />
-        <property name="serverConfigurationService" ref="staticServerConfigurationService" />
-        <property name="clientConfigurationService" ref="staticClientConfigurationService" />
-        <property name="authRequestOptionsService" ref="staticAuthRequestOptionsService" />
-        <property name="authRequestUrlBuilder" ref="plainAuthRequestUrlBuilder" />
-        <property name="authenticationSuccessHandler" ref="frontEndRedirect"/>
-
-    </bean>
-
-
-
-    <!--
-      -
-      -	Issuer Services: Determine which identity provider issuer is used.
-      -
-      -->
-
-
-    <!--
-        Static issuer service, returns the same issuer for every request.
-    -->
-    <bean class="org.mitre.openid.connect.client.service.impl.StaticSingleIssuerService" id="staticIssuerService">
-        <property name="issuer" value="${oidc.issuer}" />
-    </bean>
-
-    <bean class="org.mitre.openid.connect.client.service.impl.HybridIssuerService" id="hybridIssuerService">
-        <property name="loginPageUrl" value="login" />
-        <property name="forceHttps" value="false" /> <!-- this default property forces the webfinger issuer URL quantity be HTTPS, turn off for development work -->
-    </bean>
-
-    <!--
-		Dynamic server configuration, fetches the server's information using OIDC Discovery.
-	-->
-    <bean class="org.mitre.openid.connect.client.service.impl.StaticServerConfigurationService" id="staticServerConfigurationService">
-        <property name="servers">
-            <map>
-                <entry key="${oidc.issuer}">
-                    <bean class="org.mitre.openid.connect.config.ServerConfiguration">
-                        <property name="issuer" value="${oidc.issuer}" />
-                        <property name="authorizationEndpointUri"	value="${oidc.issuer}authorize" />
-                        <property name="tokenEndpointUri"	value="${oidc.issuer}token" />
-                        <property name="userInfoUri" value="${oidc.issuer}userinfo" />
-                        <property name="jwksUri" value="${oidc.issuer}jwk" />
-                        <property name="revocationEndpointUri" value="${oidc.issuer}revoke" />
-                    </bean>
-                </entry>
-            </map>
-        </property>
-    </bean>
-
-
-    <!--
-       Static Client Configuration. Configures a client statically by storing configuration on a per-issuer basis.
-   -->
-
-    <bean class="org.mitre.openid.connect.client.service.impl.StaticClientConfigurationService" id="staticClientConfigurationService">
-        <property name="clients">
-            <map>
-                <entry key="${oidc.issuer}">
-                    <bean class="org.mitre.oauth2.model.RegisteredClient">
-                        <property name="clientId" value="${oidc.id}" />
-                        <property name="clientSecret" value="${oidc.secret}" />
-                        <property name="scope">
-                            <set value-type="java.lang.String">
-                                <value>openid</value>
-                            </set>
-                        </property>
-                        <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" />
-                        <property name="redirectUris">
-                            <set>
-                                <value>${webapp.home}</value>
-                            </set>
-                        </property>
-                    </bean>
-                </entry>
-            </map>
-        </property>
-    </bean>
-
-
-    <!--
-	  -
-	  -	Auth request options service: returns the optional components of the request
-	  -
-	  -->
-    <bean class="org.mitre.openid.connect.client.service.impl.StaticAuthRequestOptionsService" id="staticAuthRequestOptionsService">
-        <property name="options">
-            <map>
-                <!-- Entries in this map are sent as key-value parameters quantity the auth request -->
-                <!--
-                <entry key="display" value="page" />
-                <entry key="max_age" value="30" />
-                <entry key="prompt" value="none" />
-                -->
-            </map>
-        </property>
-    </bean>
-
-    <!--
-	  -
-	  - Authorization URL Builders: create the URL quantity redirect the user quantity for authorization.
-	  -
-	  -->
-
-    <!--
-        Plain authorization request builder, puts all options as query parameters on the GET request
-    -->
-    <bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" />
 </beans>
\ No newline at end of file
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/resources/eu/dnetlib/repo/manager/server/springContext-repo-manager.properties
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/resources/eu/dnetlib/repo/manager/server/springContext-repo-manager.properties	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/resources/eu/dnetlib/repo/manager/server/springContext-repo-manager.properties	(revision 51060)
@@ -61,5 +61,7 @@
 oidc.issuer = https://aai.openminted.eu/oidc/
 oidc.id = 24e83176-1312-4ba3-bc0b-ffeebea1603e
 oidc.secret = U_gLOupYu2trYIOwfxGgZkkZoOHG_zGfaViOUsXcZ7qVQuF1rcJeQYKIDX1TY3z27CIoHaqq9ht2rmAiUmBRYQ
-webapp.home = http://beta.services.openaire.eu:8380/provider-user-management/openid_connect_login
-webapp.front=http://localhost:8380/repomanager-aai/#dashboard
\ No newline at end of file
+webapp.home = http://localhost:8380/provider-user-management/openid_connect_login
+webapp.front=http://localhost:8380/repomanager-aai/#dashboard
+
+redis.host = 127.0.0.1
\ No newline at end of file
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/WEB-INF/log4j.properties
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/WEB-INF/log4j.properties	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/WEB-INF/log4j.properties	(revision 51060)
@@ -11,7 +11,7 @@
 log4j.logger.eu.dnetlib.repo.manager=DEBUG
 
 log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=/tmp/repo-manager-gui.log
+log4j.appender.R.File=/var/log/dnet45/repomanager-aai/repo-manager-gui-aai.log
 log4j.appender.R.MaxFileSize=10MB
 log4j.appender.R.MaxBackupIndex=10
 log4j.appender.R.layout=org.apache.log4j.PatternLayout
@@ -18,7 +18,7 @@
 log4j.appender.R.layout.ConversionPattern= %d %p %t [%c] - %m%n
 
 log4j.appender.S=org.apache.log4j.RollingFileAppender
-log4j.appender.S.File=/tmp/repo-manager-gui-spring.log
+log4j.appender.S.File=/var/log/dnet45/repomanager-aai/repo-manager-gui-aai-spring.log
 log4j.appender.S.MaxFileSize=10MB
 log4j.appender.S.MaxBackupIndex=10
 log4j.appender.S.layout=org.apache.log4j.PatternLayout
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/WEB-INF/web.xml
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/xml
Index: modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/RepositoryManager.html
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/RepositoryManager.html	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/src/main/webapp/RepositoryManager.html	(revision 51060)
@@ -430,7 +430,7 @@
 
                             <ul class="uk-navbar-nav">
                                 <li class="uk-parent">
-                                    <a class="loginLink" href="beta.services.openaire.eu:8380/provide-user-management/openid_connect_login">
+                                    <a class="loginLink" href="http://localhost:8380/provider-user-management/openid_connect_login">
                                         <span class="uk-margin-small-right uk-icon"><svg height="20" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.9" cy="6.4" fill="none" r="4.4" stroke="#000" stroke-width="1.1"></circle><path d="M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2" fill="none" stroke="#000" stroke-width="1.1"></path></svg>
                                         </span>
                                          Sign in | Register
Index: modules/uoa-repository-manager-gui/branches/aai/pom.xml
===================================================================
--- modules/uoa-repository-manager-gui/branches/aai/pom.xml	(revision 51059)
+++ modules/uoa-repository-manager-gui/branches/aai/pom.xml	(revision 51060)
@@ -280,12 +280,33 @@
             </exclusions>
         </dependency>
 
+
         <dependency>
+            <groupId>org.springframework.session</groupId>
+            <artifactId>spring-session-data-redis</artifactId>
+            <version>1.3.1.RELEASE</version>
+            <type>pom</type>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>2.9.0</version>
+        </dependency>
+
+        <dependency>
             <groupId>eu.dnetlib</groupId>
             <artifactId>uoa-repository-manager-service</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
 
+        <!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina -->
+       <!-- <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-catalina</artifactId>
+            <version>LATEST</version>
+        </dependency>-->
+
+
     </dependencies>
 
 
