mirror of
https://github.com/apache/nifi.git
synced 2025-02-09 11:35:05 +00:00
NIFI-655:
- Addressing checkstyle issues.
This commit is contained in:
parent
ade5dc9bac
commit
5e341214a6
@ -33,7 +33,6 @@ import org.apache.nifi.web.security.x509.ocsp.OcspCertificateValidator;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
import org.springframework.security.authentication.AuthenticationManager;
|
||||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||||
|
@ -40,7 +40,7 @@ public class NiFiAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
|||||||
public NiFiAuthenticationEntryPoint(NiFiProperties properties) {
|
public NiFiAuthenticationEntryPoint(NiFiProperties properties) {
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Always returns a 403 error code to the client.
|
* Always returns a 403 error code to the client.
|
||||||
*
|
*
|
||||||
|
@ -50,7 +50,7 @@ public class NiFiAnonymousUserFilter extends AnonymousAuthenticationFilter {
|
|||||||
try {
|
try {
|
||||||
// load the anonymous user from the database
|
// load the anonymous user from the database
|
||||||
NiFiUser user = userService.getUserByDn(NiFiUser.ANONYMOUS_USER_DN);
|
NiFiUser user = userService.getUserByDn(NiFiUser.ANONYMOUS_USER_DN);
|
||||||
|
|
||||||
// only create an authentication token if the anonymous user has some authorities
|
// only create an authentication token if the anonymous user has some authorities
|
||||||
if (!user.getAuthorities().isEmpty()) {
|
if (!user.getAuthorities().isEmpty()) {
|
||||||
NiFiUserDetails userDetails = new NiFiUserDetails(user);
|
NiFiUserDetails userDetails = new NiFiUserDetails(user);
|
||||||
@ -68,10 +68,7 @@ public class NiFiAnonymousUserFilter extends AnonymousAuthenticationFilter {
|
|||||||
return authentication;
|
return authentication;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* setters */
|
/* setters */
|
||||||
|
|
||||||
public void setUserService(UserService userService) {
|
public void setUserService(UserService userService) {
|
||||||
this.userService = userService;
|
this.userService = userService;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ public class LoginAuthenticationFilter extends AbstractAuthenticationProcessingF
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensures the proxyChain is authorized before allowing the user to be authenticated.
|
* Ensures the proxyChain is authorized before allowing the user to be authenticated.
|
||||||
*
|
*
|
||||||
* @param proxyChain the proxy chain
|
* @param proxyChain the proxy chain
|
||||||
* @throws AuthenticationException if the proxy chain is not authorized
|
* @throws AuthenticationException if the proxy chain is not authorized
|
||||||
*/
|
*/
|
||||||
@ -149,7 +149,7 @@ public class LoginAuthenticationFilter extends AbstractAuthenticationProcessingF
|
|||||||
|
|
||||||
// generate JWT for response
|
// generate JWT for response
|
||||||
jwtService.addToken(response, authentication);
|
jwtService.addToken(response, authentication);
|
||||||
|
|
||||||
// mark as successful
|
// mark as successful
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
response.setContentType("text/plain");
|
response.setContentType("text/plain");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user