|
|
@@ -33,7 +33,6 @@ import org.springframework.security.core.GrantedAuthority;
|
|
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
|
|
-import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -191,11 +190,8 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
|
|
|
*/
|
|
|
protected void setResponseAuthorized(HttpServletResponse response, boolean authorized) {
|
|
|
response.setStatus(authorized ? HttpStatus.OK.value() : HttpStatus.UNAUTHORIZED.value());
|
|
|
- try {
|
|
|
- printJson(response, new ModelMap("authorized", authorized));
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ String authorizedValue = authorized ? HttpStatus.OK.name() : HttpStatus.UNAUTHORIZED.name();
|
|
|
+ response.setHeader("authorized", authorizedValue);
|
|
|
}
|
|
|
|
|
|
/**
|