public abstract class NiFiAuthenticationFilter
extends org.springframework.web.filter.GenericFilterBean
| Modifier and Type | Field and Description |
|---|---|
private org.springframework.security.authentication.AuthenticationManager |
authenticationManager |
private static org.slf4j.Logger |
log |
private NiFiProperties |
properties |
| Constructor and Description |
|---|
NiFiAuthenticationFilter() |
| Modifier and Type | Method and Description |
|---|---|
abstract org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request)
Attempt to extract an authentication attempt from the specified request.
|
private void |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain) |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
NiFiProperties |
getProperties() |
private boolean |
requiresAuthentication() |
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager) |
void |
setProperties(NiFiProperties properties) |
protected void |
successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authResult)
If authentication was successful, apply the successful authentication result to the security context and add
proxy headers to the response if the request was made via a proxy.
|
protected void |
unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException ae)
If authentication was unsuccessful, update the response with the appropriate status and give the reason for why
the user was not able to be authenticated.
|
private static final org.slf4j.Logger log
private org.springframework.security.authentication.AuthenticationManager authenticationManager
private NiFiProperties properties
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprivate boolean requiresAuthentication()
private void authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionpublic abstract org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request)
request - The requestprotected void successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authResult)
request - The original client request that was successfully authenticated.response - Servlet response to the client containing the successful authentication details.authResult - The Authentication 'token'/object created by one of the various NiFiAuthenticationFilter subclasses.protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException ae)
throws IOException
request - The original client request that failed to be authenticated.response - Servlet response to the client containing the unsuccessful authentication attempt details.ae - The related exception thrown and explanation for the unsuccessful authentication attempt.IOExceptionpublic void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
public void setProperties(NiFiProperties properties)
public NiFiProperties getProperties()
Copyright © 2023 Apache NiFi Project. All rights reserved.