Top Description Fields Constructors Methods
waffle.servlet.spi

public Class NegotiateSecurityFilterProvider

extends Object
implements SecurityFilterProvider
Class Inheritance
All Implemented Interfaces
waffle.servlet.spi.SecurityFilterProvider
Imports
java.io.IOException, java.security.InvalidParameterException, java.util.ArrayList, .Base64, .List, javax.servlet.http.HttpServletRequest, .HttpServletResponse, org.slf4j.Logger, .LoggerFactory, waffle.util.AuthorizationHeader, .NtlmServletRequest, waffle.windows.auth.IWindowsAuthProvider, .IWindowsIdentity, .IWindowsSecurityContext

A negotiate security filter provider.
Author
dblock[at]dblock[dot]org

Field Summary

Modifier and TypeField and Description
private final IWindowsAuthProvider
auth

The auth.

private static final Logger
LOGGER

The Constant LOGGER.

private static final String
NEGOTIATE

The Constant NEGOTIATE.

private static final String
NTLM

The Constant NTLM.

private static final String
PROTOCOLS

The Constant PROTOCOLS.

private List<String>
protocolsList

The protocols.

private static final String
WWW_AUTHENTICATE

The Constant WWW_AUTHENTICATE.

Constructor Summary

AccessConstructor and Description
public
NegotiateSecurityFilterProvider(final IWindowsAuthProvider
the new auth provider
newAuthProvider
)

Instantiates a new negotiate security filter provider.

Method Summary

Modifier and TypeMethod and Description
public IWindowsIdentity
doFilter(final HttpServletRequest
Http Servlet Request.
request
,
final HttpServletResponse
Http Servlet Response.
response
)

Implements waffle.servlet.spi.SecurityFilterProvider.doFilter.

Execute filter.
public List<String>

Returns:

the protocols
getProtocols
()

Gets the protocols.

public void
initParameter(final String
Parameter name.
parameterName
,
final String
Parameter value.
parameterValue
)

Implements waffle.servlet.spi.SecurityFilterProvider.initParameter.

Init a parameter.
public boolean
isPrincipalException(final HttpServletRequest
Http Request.
request
)

Implements waffle.servlet.spi.SecurityFilterProvider.isPrincipalException.

Returns true if despite having a principal authentication needs to happen.
public boolean
isSecurityPackageSupported(final String
Security package.
securityPackage
)

Implements waffle.servlet.spi.SecurityFilterProvider.isSecurityPackageSupported.

Tests whether a specific security package is supported.
public void
sendUnauthorized(final HttpServletResponse
Http Response.
response
)

Implements waffle.servlet.spi.SecurityFilterProvider.sendUnauthorized.

Add authentication method headers.
public void
setProtocols(final List<String>
the new protocols
values
)

Sets the protocols.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authback to summary
private final IWindowsAuthProvider auth

The auth.

LOGGERback to summary
private static final Logger LOGGER

The Constant LOGGER.

NEGOTIATEback to summary
private static final String NEGOTIATE

The Constant NEGOTIATE.

NTLMback to summary
private static final String NTLM

The Constant NTLM.

PROTOCOLSback to summary
private static final String PROTOCOLS

The Constant PROTOCOLS.

protocolsListback to summary
private List<String> protocolsList

The protocols.

WWW_AUTHENTICATEback to summary
private static final String WWW_AUTHENTICATE

The Constant WWW_AUTHENTICATE.

Constructor Detail

NegotiateSecurityFilterProviderback to summary
public NegotiateSecurityFilterProvider(final IWindowsAuthProvider newAuthProvider)

Instantiates a new negotiate security filter provider.

Parameters
newAuthProvider:IWindowsAuthProvider

the new auth provider

Method Detail

doFilterback to summary
public IWindowsIdentity doFilter(final HttpServletRequest request, final HttpServletResponse response) throws IOException

Implements waffle.servlet.spi.SecurityFilterProvider.doFilter.

Doc from waffle.servlet.spi.SecurityFilterProvider.doFilter.

Execute filter.

Parameters
request:HttpServletRequest

Http Servlet Request.

response:HttpServletResponse

Http Servlet Response.

Returns:IWindowsIdentity

A Windows identity in case authentication completed or NULL if not. Thrown exceptions should be caught and processed as 401 Access Denied.

Annotations
@Override
Exceptions
IOException:
on doFilter.
getProtocolsback to summary
public List<String> getProtocols()

Gets the protocols.

Returns:List<String>

the protocols

initParameterback to summary
public void initParameter(final String parameterName, final String parameterValue)

Implements waffle.servlet.spi.SecurityFilterProvider.initParameter.

Doc from waffle.servlet.spi.SecurityFilterProvider.initParameter.

Init a parameter.

Parameters
parameterName:String

Parameter name.

parameterValue:String

Parameter value.

Annotations
@Override
isPrincipalExceptionback to summary
public boolean isPrincipalException(final HttpServletRequest request)

Implements waffle.servlet.spi.SecurityFilterProvider.isPrincipalException.

Doc from waffle.servlet.spi.SecurityFilterProvider.isPrincipalException.

Returns true if despite having a principal authentication needs to happen.

Parameters
request:HttpServletRequest

Http Request.

Returns:boolean

True if authentication is required.

Annotations
@Override
isSecurityPackageSupportedback to summary
public boolean isSecurityPackageSupported(final String securityPackage)

Implements waffle.servlet.spi.SecurityFilterProvider.isSecurityPackageSupported.

Doc from waffle.servlet.spi.SecurityFilterProvider.isSecurityPackageSupported.

Tests whether a specific security package is supported.

Parameters
securityPackage:String

Security package.

Returns:boolean

True if the security package is supported, false otherwise.

Annotations
@Override
sendUnauthorizedback to summary
public void sendUnauthorized(final HttpServletResponse response)

Implements waffle.servlet.spi.SecurityFilterProvider.sendUnauthorized.

Doc from waffle.servlet.spi.SecurityFilterProvider.sendUnauthorized.

Add authentication method headers.

Parameters
response:HttpServletResponse

Http Response.

Annotations
@Override
setProtocolsback to summary
public void setProtocols(final List<String> values)

Sets the protocols.

Parameters
values:List<String>

the new protocols