Package waffle.servlet
Class NegotiateSecurityFilter
java.lang.Object
waffle.servlet.NegotiateSecurityFilter
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
CorsAwareNegotiateSecurityFilter
A Negotiate (NTLM/Kerberos) Security Filter.
- Author:
- dblock[at]dblock[dot]org
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(javax.servlet.ServletRequest sreq, javax.servlet.ServletResponse sres, javax.servlet.FilterChain chain) getAuth()Windows auth provider.Principal format.Security filter providers.Principal format.voidinit(javax.servlet.FilterConfig filterConfig) booleanTrue if guest login is allowed.booleanChecks if is impersonate.voidsetAuth(IWindowsAuthProvider provider) Set Windows auth provider.voidsetImpersonate(boolean value) Enable/Disable impersonation.voidsetPrincipalFormat(String format) Set the principal format.voidsetRoleFormat(String format) Set the principal format.
-
Constructor Details
-
NegotiateSecurityFilter
public NegotiateSecurityFilter()Instantiates a new negotiate security filter.
-
-
Method Details
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest sreq, javax.servlet.ServletResponse sres, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
setPrincipalFormat
Set the principal format.- Parameters:
format- Principal format.
-
getPrincipalFormat
Principal format.- Returns:
- Principal format.
-
setRoleFormat
Set the principal format.- Parameters:
format- Role format.
-
getRoleFormat
Principal format.- Returns:
- Role format.
-
getAuth
Windows auth provider.- Returns:
- IWindowsAuthProvider.
-
setAuth
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
Security filter providers.- Returns:
- A collection of security filter providers.
-