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 TypeMethodDescriptionvoid
destroy()
void
doFilter
(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 String
static String
static String
static String
static String
void
init
(javax.servlet.FilterConfig filterConfig) static Principal
negotiateIIS
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, boolean skipAuthentication) Negotiate user from request.getUserPrincipal(), check for correct domainName from NTLMiisTrustedDomainsstatic boolean
ak 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:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroy
in 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:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.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:
IOException
javax.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
-