提交 8b84163c 编写于 作者: ibiz4j's avatar ibiz4j

pom

上级 908d87fc
...@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; ...@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
...@@ -241,6 +242,11 @@ public class AuthenticationUser implements UserDetails ...@@ -241,6 +242,11 @@ public class AuthenticationUser implements UserDetails
if(userDetails instanceof AuthenticationUser) { if(userDetails instanceof AuthenticationUser) {
authuserdetail= (AuthenticationUser)userDetails; authuserdetail= (AuthenticationUser)userDetails;
} }
else if (userDetails instanceof String) {
authuserdetail=new AuthenticationUser();
authuserdetail.setUserid(userDetails.toString());
authuserdetail.setUsername(userDetails.toString());
}
else { else {
authuserdetail=new AuthenticationUser(); authuserdetail=new AuthenticationUser();
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册