diff --git a/pom.xml b/pom.xml index 74428d048bdd8a5472cd5a343185bfbb03a3d0b7..aa4a9b35e30ee8a46aa9f38665d607a728bd3f25 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ <packaging>war</packaging> <properties> - <io.spring.platform-version>Brussels-SR2</io.spring.platform-version> + <io.spring.platform-version>Brussels-SR4</io.spring.platform-version> <org.aspectj-version>1.8.10</org.aspectj-version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <timestamp>${maven.build.timestamp}</timestamp> @@ -213,7 +213,7 @@ <dependency> <groupId>com.sun.mail</groupId> <artifactId>javax.mail</artifactId> - <version>1.5.6</version> + <version>1.6.0</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -228,12 +228,12 @@ <dependency> <groupId>org.pac4j</groupId> <artifactId>spring-security-pac4j</artifactId> - <version>2.1.2</version> + <version>3.0.0</version> </dependency> <dependency> <groupId>org.pac4j</groupId> <artifactId>pac4j-oauth</artifactId> - <version>1.9.7</version> + <version>2.1.0</version> </dependency> <dependency> <groupId>com.corundumstudio.socketio</groupId> @@ -298,7 +298,7 @@ <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-annotations</artifactId> - <version>1.5.13</version> + <version>1.5.16</version> </dependency> <dependency> <groupId>com.codahale.metrics</groupId> @@ -308,7 +308,7 @@ <dependency> <groupId>org.checkerframework</groupId> <artifactId>checker-qual</artifactId> - <version>2.1.11</version> + <version>2.1.14</version> </dependency> </dependencies> @@ -375,7 +375,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.6.1</version> + <version>3.6.2</version> <configuration> <source>1.8</source> <target>1.8</target> @@ -384,7 +384,7 @@ <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> - <version>9.4.5.v20170502</version> + <version>9.4.6.v20170531</version> <configuration> <scanIntervalSeconds>1</scanIntervalSeconds> <webApp> @@ -467,7 +467,7 @@ <plugin> <groupId>com.github.kongchen</groupId> <artifactId>swagger-maven-plugin</artifactId> - <version>3.1.4</version> + <version>3.1.5</version> <configuration> <apiSources> <apiSource> diff --git a/src/main/java/de/thm/arsnova/entities/User.java b/src/main/java/de/thm/arsnova/entities/User.java index 9d4729d44887ce9c8024b57300c31618db6ed1e0..cbd822c1792ea338396ea68eed25a83380b9b731 100644 --- a/src/main/java/de/thm/arsnova/entities/User.java +++ b/src/main/java/de/thm/arsnova/entities/User.java @@ -59,7 +59,7 @@ public class User implements Serializable { } public User(FacebookProfile profile) { - setUsername(profile.getProfileUrl()); + setUsername(profile.getProfileUrl().toString()); setType(User.FACEBOOK); } diff --git a/src/test/java/de/thm/arsnova/services/UserServiceTest.java b/src/test/java/de/thm/arsnova/services/UserServiceTest.java index 1d2cb8ec70e5105001bf4336432d6c5ec0ee18bb..9b1f43769bfb64520e483ac5777993faa12a1354 100644 --- a/src/test/java/de/thm/arsnova/services/UserServiceTest.java +++ b/src/test/java/de/thm/arsnova/services/UserServiceTest.java @@ -26,9 +26,9 @@ import org.jasig.cas.client.authentication.AttributePrincipalImpl; import org.junit.Test; import org.junit.runner.RunWith; import org.pac4j.oauth.profile.JsonHelper; -import org.pac4j.oauth.profile.google2.Google2AttributesDefinition; import org.pac4j.oauth.profile.google2.Google2Email; import org.pac4j.oauth.profile.google2.Google2Profile; +import org.pac4j.oauth.profile.google2.Google2ProfileDefinition; import org.springframework.security.authentication.AnonymousAuthenticationToken; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; @@ -70,8 +70,8 @@ public class UserServiceTest { ArrayList<Google2Email> emails = new ArrayList<>(); emails.add(email); Google2Profile profile = new Google2Profile(); - profile.addAttribute(Google2AttributesDefinition.DISPLAY_NAME, "ptsr00"); - profile.addAttribute(Google2AttributesDefinition.EMAILS, JsonHelper.toJSONString(emails)); + profile.addAttribute(Google2ProfileDefinition.DISPLAY_NAME, "ptsr00"); + profile.addAttribute(Google2ProfileDefinition.EMAILS, emails); socketid2user.put(UUID.randomUUID(), new User(profile)); List<GrantedAuthority> authorities = new ArrayList<>();