Package waffle.servlet.spi

## Class NegotiateSecurityFilterProvider

- java.lang.Object
- - waffle.servlet.spi.NegotiateSecurityFilterProvider

All Implemented Interfaces:
  `SecurityFilterProvider`

    public class NegotiateSecurityFilterProvider
    extends Object
    implements SecurityFilterProvider

A negotiate security filter provider.

Author:
  dblock[at]dblock[dot]org

### Constructor Summary

Constructors
`NegotiateSecurityFilterProvider​(IWindowsAuthProvider newAuthProvider)` Instantiates a new negotiate security filter provider.

### Method Summary

All Methods Instance Methods Concrete Methods
`IWindowsIdentity` `doFilter​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Execute filter.
`List<String>` `getProtocols()` Gets the protocols.
`void` `initParameter​(String parameterName, String parameterValue)` Init a parameter.
`boolean` `isPrincipalException​(javax.servlet.http.HttpServletRequest request)` Returns true if despite having a principal authentication needs to happen.
`boolean` `isSecurityPackageSupported​(String securityPackage)` Tests whether a specific security package is supported.
`void` `sendUnauthorized​(javax.servlet.http.HttpServletResponse response)` Add authentication method headers.
`void` `setProtocols​(List<String> values)` Sets the protocols.

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### NegotiateSecurityFilterProvider

    public NegotiateSecurityFilterProvider​(IWindowsAuthProvider newAuthProvider)

Instantiates a new negotiate security filter provider.

Parameters:
  `newAuthProvider` - the new auth provider

### Method Detail

#### getProtocols

    public List<String> getProtocols()

Gets the protocols.

Returns:
  the protocols

#### setProtocols

    public void setProtocols​(List<String> values)

Sets the protocols.

Parameters:
  `values` - the new protocols

#### sendUnauthorized

    public void sendUnauthorized​(javax.servlet.http.HttpServletResponse response)

Description copied from interface: `SecurityFilterProvider`
Add authentication method headers.

Specified by:
  `sendUnauthorized` in interface `SecurityFilterProvider`
Parameters:
  `response` - Http Response.

#### isPrincipalException

    public boolean isPrincipalException​(javax.servlet.http.HttpServletRequest request)

Description copied from interface: `SecurityFilterProvider`
Returns true if despite having a principal authentication needs to happen.

Specified by:
  `isPrincipalException` in interface `SecurityFilterProvider`
Parameters:
  `request` - Http Request.
Returns:
  True if authentication is required.

#### doFilter

    public IWindowsIdentity doFilter​(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws IOException

Description copied from interface: `SecurityFilterProvider`
Execute filter.

Specified by:
  `doFilter` in interface `SecurityFilterProvider`
Parameters:
  `request` - Http Servlet Request.
  `response` - Http Servlet Response.
Returns:
  A Windows identity in case authentication completed or NULL if not. Thrown exceptions should be caught and processed as 401 Access Denied.
Throws:
  `IOException` - on doFilter.

#### isSecurityPackageSupported

    public boolean isSecurityPackageSupported​(String securityPackage)

Description copied from interface: `SecurityFilterProvider`
Tests whether a specific security package is supported.

Specified by:
  `isSecurityPackageSupported` in interface `SecurityFilterProvider`
Parameters:
  `securityPackage` - Security package.
Returns:
  True if the security package is supported, false otherwise.

#### initParameter

    public void initParameter​(String parameterName,
                              String parameterValue)

Description copied from interface: `SecurityFilterProvider`
Init a parameter.

Specified by:
  `initParameter` in interface `SecurityFilterProvider`
Parameters:
  `parameterName` - Parameter name.
  `parameterValue` - Parameter value.