Package waffle.spring

Class NegotiateSecurityFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
waffle.spring.NegotiateSecurityFilter
All Implemented Interfaces:
jakarta.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware
Direct Known Subclasses:
DelegatingNegotiateSecurityFilter

public class NegotiateSecurityFilter extends org.springframework.web.filter.GenericFilterBean
A Spring Negotiate security filter.
  • Constructor Details

    • NegotiateSecurityFilter

      public NegotiateSecurityFilter()
      Instantiates a new negotiate security filter.
  • Method Details

    • doFilter

      public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • setAuthentication

      protected boolean setAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
      Invoked when authentication towards ad was succesful to populate securitycontext Override to add service provider authorization checks.
      Parameters:
      request - the request
      response - the response
      authentication - the authentication
      Returns:
      true, if successful
    • afterPropertiesSet

      public void afterPropertiesSet() throws javax.servlet.ServletException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.web.filter.GenericFilterBean
      Throws:
      javax.servlet.ServletException
    • sendUnauthorized

      protected void sendUnauthorized(javax.servlet.http.HttpServletResponse response, boolean close)
      Send a 401 Unauthorized along with protocol authentication headers.
      Parameters:
      response - HTTP Response
      close - Close connection.
    • getPrincipalFormat

      public PrincipalFormat getPrincipalFormat()
      Gets the principal format.
      Returns:
      the principal format
    • setPrincipalFormatEnum

      public void setPrincipalFormatEnum(PrincipalFormat value)
      Sets the principal format enum.
      Parameters:
      value - the new principal format enum
    • setPrincipalFormat

      public void setPrincipalFormat(String value)
      Sets the principal format.
      Parameters:
      value - the new principal format
    • getRoleFormat

      public PrincipalFormat getRoleFormat()
      Gets the role format.
      Returns:
      the role format
    • setRoleFormatEnum

      public void setRoleFormatEnum(PrincipalFormat value)
      Sets the role format enum.
      Parameters:
      value - the new role format enum
    • setRoleFormat

      public void setRoleFormat(String value)
      Sets the role format.
      Parameters:
      value - the new role format
    • isAllowGuestLogin

      public boolean isAllowGuestLogin()
      Checks if is allow guest login.
      Returns:
      true, if is allow guest login
    • setAllowGuestLogin

      public void setAllowGuestLogin(boolean value)
      Sets the allow guest login.
      Parameters:
      value - the new allow guest login
    • setImpersonate

      public void setImpersonate(boolean value)
      Enable/Disable impersonation.
      Parameters:
      value - true to enable impersonation, false otherwise
    • isImpersonate

      public boolean isImpersonate()
      Checks if is impersonate.
      Returns:
      true if impersonation is enabled, false otherwise
    • getProvider

      public SecurityFilterProviderCollection getProvider()
      Gets the provider.
      Returns:
      the provider
    • setProvider

      public void setProvider(SecurityFilterProviderCollection value)
      Sets the provider.
      Parameters:
      value - the new provider
    • getGrantedAuthorityFactory

      public GrantedAuthorityFactory getGrantedAuthorityFactory()
      Gets the granted authority factory.
      Returns:
      the granted authority factory
    • setGrantedAuthorityFactory

      public void setGrantedAuthorityFactory(GrantedAuthorityFactory value)
      Sets the granted authority factory.
      Parameters:
      value - the new granted authority factory
    • getDefaultGrantedAuthority

      public org.springframework.security.core.GrantedAuthority getDefaultGrantedAuthority()
      Gets the default granted authority.
      Returns:
      the default granted authority
    • setDefaultGrantedAuthority

      public void setDefaultGrantedAuthority(org.springframework.security.core.GrantedAuthority value)
      Sets the default granted authority.
      Parameters:
      value - the new default granted authority