# Class NegotiateSecurityFilter

java.lang.Object
waffle.servlet.NegotiateSecurityFilter

Direct Known Subclasses:
  `CorsAwareNegotiateSecurityFilter`

public class NegotiateSecurityFilter extends Object
A Negotiate (NTLM/Kerberos) Security Filter.

## Constructor Summary

Constructors
Constructor
Description
`NegotiateSecurityFilter()`
Instantiates a new negotiate security filter.

## Method Summary

Modifier and Type
Method
Description
`void`
`destroy()`
`void`
`doFilter(javax.servlet.ServletRequest sreq, javax.servlet.ServletResponse sres, javax.servlet.FilterChain chain)`
`IWindowsAuthProvider`
`getAuth()`
Windows auth provider.
`PrincipalFormat`
`getPrincipalFormat()`
Principal format.
`SecurityFilterProviderCollection`
`getProviders()`
Security filter providers.
`PrincipalFormat`
`getRoleFormat()`
Principal format.
`void`
`init(javax.servlet.FilterConfig filterConfig)`
`boolean`
`isAllowGuestLogin()`
True if guest login is allowed.
`boolean`
`isImpersonate()`
Checks if is impersonate.
`void`
`setAuth(IWindowsAuthProvider provider)`
Set Windows auth provider.
`void`
`setImpersonate(boolean value)`
Enable/Disable impersonation.
`void`
`setPrincipalFormat(String format)`
Set the principal format.
`void`
`setRoleFormat(String format)`
Set the principal format.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### NegotiateSecurityFilter

public NegotiateSecurityFilter()
Instantiates a new negotiate security filter.

## Method Details

### destroy

public void destroy()

### doFilter

public void doFilter(javax.servlet.ServletRequest sreq, javax.servlet.ServletResponse sres, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException

Throws:
  `IOException`
  `javax.servlet.ServletException`

### init

public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException

Throws:
  `javax.servlet.ServletException`

### setPrincipalFormat

public void setPrincipalFormat(String format)
Set the principal format.

Parameters:
  `format` - Principal format.

### getPrincipalFormat

public PrincipalFormat getPrincipalFormat()
Principal format.

Returns:
  Principal format.

### setRoleFormat

public void setRoleFormat(String format)
Set the principal format.

Parameters:
  `format` - Role format.

### getRoleFormat

public PrincipalFormat getRoleFormat()
Principal format.

Returns:
  Role format.

### getAuth

public IWindowsAuthProvider getAuth()
Windows auth provider.

Returns:
  IWindowsAuthProvider.

### setAuth

public void setAuth(IWindowsAuthProvider provider)
Set Windows auth provider.

Parameters:
  `provider` - Class implements IWindowsAuthProvider.

### isAllowGuestLogin

public boolean isAllowGuestLogin()
True if guest login is allowed.

Returns:
  True if guest login is allowed, false otherwise.

### 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

### getProviders

public SecurityFilterProviderCollection getProviders()
Security filter providers.

Returns:
  A collection of security filter providers.