aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/security
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-03-07 13:20:45 +0300
committerGravatar Vitaly Takmazov2020-03-07 13:20:45 +0300
commitc9d67837cbcaae84a03b7bd14e508ca62880f87f (patch)
tree0f66e38f5b6aa48c66fae7d10c0b8b5ad6f7e7e2 /src/main/java/com/juick/service/security
parentad50d1090b303d3a71c354dd2922a982fda6a289 (diff)
Reorganize project layout
Diffstat (limited to 'src/main/java/com/juick/service/security')
-rw-r--r--src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java2
-rw-r--r--src/main/java/com/juick/service/security/HashParamAuthenticationFilter.java2
-rw-r--r--src/main/java/com/juick/service/security/JuickUserDetailsService.java3
-rw-r--r--src/main/java/com/juick/service/security/entities/JuickUser.java8
4 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java
index 01a35695..1b3cb936 100644
--- a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java
+++ b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java
@@ -17,7 +17,7 @@
package com.juick.service.security;
-import com.juick.User;
+import com.juick.model.User;
import com.juick.server.SignatureManager;
import com.juick.service.UserService;
import com.juick.service.security.entities.JuickUser;
diff --git a/src/main/java/com/juick/service/security/HashParamAuthenticationFilter.java b/src/main/java/com/juick/service/security/HashParamAuthenticationFilter.java
index 3dc58782..68ae91ee 100644
--- a/src/main/java/com/juick/service/security/HashParamAuthenticationFilter.java
+++ b/src/main/java/com/juick/service/security/HashParamAuthenticationFilter.java
@@ -17,7 +17,7 @@
package com.juick.service.security;
-import com.juick.User;
+import com.juick.model.User;
import com.juick.service.UserService;
import com.juick.service.security.entities.JuickUser;
import org.apache.commons.lang3.StringUtils;
diff --git a/src/main/java/com/juick/service/security/JuickUserDetailsService.java b/src/main/java/com/juick/service/security/JuickUserDetailsService.java
index fd539a8c..a62bdadd 100644
--- a/src/main/java/com/juick/service/security/JuickUserDetailsService.java
+++ b/src/main/java/com/juick/service/security/JuickUserDetailsService.java
@@ -17,6 +17,7 @@
package com.juick.service.security;
+import com.juick.model.User;
import com.juick.service.UserService;
import com.juick.service.security.entities.JuickUser;
import org.apache.commons.lang3.StringUtils;
@@ -41,7 +42,7 @@ public class JuickUserDetailsService implements UserDetailsService {
if (StringUtils.isBlank(username))
throw new UsernameNotFoundException("Invalid user name " + username);
- com.juick.User user = userService.getUserByName(username);
+ User user = userService.getUserByName(username);
if (!user.isAnonymous()) {
user.setAuthHash(userService.getHashByUID(user.getUid()));
diff --git a/src/main/java/com/juick/service/security/entities/JuickUser.java b/src/main/java/com/juick/service/security/entities/JuickUser.java
index eb2e43dc..062db3a4 100644
--- a/src/main/java/com/juick/service/security/entities/JuickUser.java
+++ b/src/main/java/com/juick/service/security/entities/JuickUser.java
@@ -17,7 +17,7 @@
package com.juick.service.security.entities;
-import com.juick.User;
+import com.juick.model.User;
import com.juick.model.AnonymousUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.core.GrantedAuthority;
@@ -40,14 +40,14 @@ public class JuickUser implements UserDetails {
public static final JuickUser ANONYMOUS_USER = new JuickUser(AnonymousUser.INSTANCE, ANONYMOUS_AUTHORITY);
- private final com.juick.User user;
+ private final User user;
private final Collection<? extends GrantedAuthority> authorities;
- public JuickUser(com.juick.User user) {
+ public JuickUser(User user) {
this(user, USER_AUTHORITY);
}
- public JuickUser(com.juick.User user, Collection<? extends GrantedAuthority> authorities) {
+ public JuickUser(User user, Collection<? extends GrantedAuthority> authorities) {
this.user = user;
this.authorities = authorities;
}