Package sk.iway.iwcm.system.ntlm
Class AuthenticationFilter
java.lang.Object
sk.iway.iwcm.system.ntlm.AuthenticationFilter
- All Implemented Interfaces:
javax.servlet.Filter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) This method simply calls negotiate( req, resp, false ) and then chain.doFilter.static Stringstatic Stringstatic Stringstatic Stringstatic Stringvoidinit(javax.servlet.FilterConfig filterConfig) static PrincipalnegotiateIIS(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, boolean skipAuthentication) Negotiate user from request.getUserPrincipal(), check for correct domainName from NTLMiisTrustedDomainsstatic booleanak je vo web.xml zadany config parameter iis.trustIIS, beriem primarne inak beriem co je zadane vo WJ konf.
-
Constructor Details
-
AuthenticationFilter
public AuthenticationFilter()
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException This method simply calls negotiate( req, resp, false ) and then chain.doFilter. You can override and call negotiate manually to achive a variety of different behavior.- Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
negotiateIIS
public static Principal negotiateIIS(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, boolean skipAuthentication) throws IOException, javax.servlet.ServletException Negotiate user from request.getUserPrincipal(), check for correct domainName from NTLMiisTrustedDomains- Parameters:
req-resp-skipAuthentication-- Returns:
- Throws:
IOExceptionjavax.servlet.ServletException
-
getLdapPassword
- Returns:
- Returns the ldapPassword.
-
getLdapProvider
- Returns:
- Returns the ldapProvider.
-
getLdapUsername
- Returns:
- Returns the ldapUsername.
-
getForbiddenURL
- Returns:
- Returns the forbiddenURL.
-
weTrustIIS
public static boolean weTrustIIS()ak je vo web.xml zadany config parameter iis.trustIIS, beriem primarne inak beriem co je zadane vo WJ konf. premennej authenticationTrustIIS- Returns:
-
getDomainController
-