增加sonar测试并修复sonar测试的问题

This commit is contained in:
zlt
2019-02-04 14:18:47 +08:00
parent e16d8f5d02
commit 110bdc5a84
58 changed files with 181 additions and 233 deletions
@@ -15,7 +15,7 @@ public class OpenIdAuthenticationProvider implements AuthenticationProvider {
private SocialUserDetailsService userDetailsService;
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
public Authentication authenticate(Authentication authentication) {
OpenIdAuthenticationToken authenticationToken = (OpenIdAuthenticationToken) authentication;
String openId = (String) authenticationToken.getPrincipal();
UserDetails user = userDetailsService.loadUserByUserId(openId);
@@ -1,6 +1,3 @@
/**
*
*/
package com.central.oauth.openid;
import org.springframework.security.authentication.AbstractAuthenticationToken;
@@ -66,7 +63,7 @@ public class OpenIdAuthenticationToken extends AbstractAuthenticationToken {
}
@Override
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException {
public void setAuthenticated(boolean isAuthenticated) {
if (isAuthenticated) {
throw new IllegalArgumentException(
"Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead");