Class NegotiateAuthenticationFilter

java.lang.Object
org.apache.shiro.web.servlet.ServletContextSupport
org.apache.shiro.web.servlet.AbstractFilter
org.apache.shiro.web.servlet.NameableFilter
org.apache.shiro.web.servlet.OncePerRequestFilter
org.apache.shiro.web.servlet.AdviceFilter
org.apache.shiro.web.filter.PathMatchingFilter
org.apache.shiro.web.filter.AccessControlFilter
org.apache.shiro.web.filter.authc.AuthenticationFilter
org.apache.shiro.web.filter.authc.AuthenticatingFilter
waffle.shiro.negotiate.NegotiateAuthenticationFilter
All Implemented Interfaces:
javax.servlet.Filter, org.apache.shiro.util.Nameable, org.apache.shiro.web.filter.PathConfigProcessor

public class NegotiateAuthenticationFilter extends org.apache.shiro.web.filter.authc.AuthenticatingFilter
A authentication filter that implements the HTTP Negotiate mechanism. The current user is authenticated, providing single-sign-on
Since:
1.0.0
Author:
Dan Rollo
  • Field Summary

    Fields inherited from class org.apache.shiro.web.filter.authc.AuthenticatingFilter

    PERMISSIVE

    Fields inherited from class org.apache.shiro.web.filter.authc.AuthenticationFilter

    DEFAULT_SUCCESS_URL

    Fields inherited from class org.apache.shiro.web.filter.AccessControlFilter

    DEFAULT_LOGIN_URL, GET_METHOD, POST_METHOD

    Fields inherited from class org.apache.shiro.web.filter.PathMatchingFilter

    appliedPaths, pathMatcher

    Fields inherited from class org.apache.shiro.web.servlet.OncePerRequestFilter

    ALREADY_FILTERED_SUFFIX

    Fields inherited from class org.apache.shiro.web.servlet.AbstractFilter

    filterConfig
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new negotiate authentication filter.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.shiro.authc.AuthenticationToken
    createToken(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
     
    Gets the failure key attribute.
    Gets the remember me param.
    protected boolean
    isRememberMe(javax.servlet.ServletRequest request)
     
    protected boolean
    onAccessDenied(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
     
    protected boolean
    onLoginFailure(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.authc.AuthenticationException e, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
     
    protected boolean
    onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.subject.Subject subject, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
     
    protected void
    setFailureAttribute(javax.servlet.ServletRequest request, org.apache.shiro.authc.AuthenticationException ae)
    Sets the failure attribute.
    void
    Sets the failure key attribute.
    void
    Sets the request parameter name to look for when acquiring the rememberMe boolean value.

    Methods inherited from class org.apache.shiro.web.filter.authc.AuthenticatingFilter

    cleanup, createToken, createToken, executeLogin, getHost, isAccessAllowed, isPermissive

    Methods inherited from class org.apache.shiro.web.filter.authc.AuthenticationFilter

    getSuccessUrl, issueSuccessRedirect, setSuccessUrl

    Methods inherited from class org.apache.shiro.web.filter.AccessControlFilter

    getLoginUrl, getSubject, isLoginRequest, onAccessDenied, onPreHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogin, setLoginUrl

    Methods inherited from class org.apache.shiro.web.filter.PathMatchingFilter

    getPathWithinApplication, isEnabled, pathsMatch, pathsMatch, preHandle, processPathConfig

    Methods inherited from class org.apache.shiro.web.servlet.AdviceFilter

    afterCompletion, doFilterInternal, executeChain, postHandle

    Methods inherited from class org.apache.shiro.web.servlet.OncePerRequestFilter

    doFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, isFilterOncePerRequest, setEnabled, setFilterOncePerRequest, shouldNotFilter

    Methods inherited from class org.apache.shiro.web.servlet.NameableFilter

    getName, setName, toStringBuilder

    Methods inherited from class org.apache.shiro.web.servlet.AbstractFilter

    destroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfig

    Methods inherited from class org.apache.shiro.web.servlet.ServletContextSupport

    getContextAttribute, getContextInitParam, getServletContext, removeContextAttribute, setContextAttribute, setServletContext, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NegotiateAuthenticationFilter

      public NegotiateAuthenticationFilter()
      Instantiates a new negotiate authentication filter.
  • Method Details

    • getRememberMeParam

      public String getRememberMeParam()
      Gets the remember me param.
      Returns:
      the remember me param
    • setRememberMeParam

      public void setRememberMeParam(String value)
      Sets the request parameter name to look for when acquiring the rememberMe boolean value. Unless overridden by calling this method, the default is rememberMe.

      RememberMe will be true if the parameter value equals any of those supported by WebUtils.isTrue(request,value), false otherwise.
      Parameters:
      value - the name of the request param to check for acquiring the rememberMe boolean value.
    • isRememberMe

      protected boolean isRememberMe(javax.servlet.ServletRequest request)
      Overrides:
      isRememberMe in class org.apache.shiro.web.filter.authc.AuthenticatingFilter
    • createToken

      protected org.apache.shiro.authc.AuthenticationToken createToken(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
      Specified by:
      createToken in class org.apache.shiro.web.filter.authc.AuthenticatingFilter
    • onLoginSuccess

      protected boolean onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.subject.Subject subject, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws Exception
      Overrides:
      onLoginSuccess in class org.apache.shiro.web.filter.authc.AuthenticatingFilter
      Throws:
      Exception
    • onLoginFailure

      protected boolean onLoginFailure(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.authc.AuthenticationException e, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
      Overrides:
      onLoginFailure in class org.apache.shiro.web.filter.authc.AuthenticatingFilter
    • setFailureAttribute

      protected void setFailureAttribute(javax.servlet.ServletRequest request, org.apache.shiro.authc.AuthenticationException ae)
      Sets the failure attribute.
      Parameters:
      request - the request
      ae - the ae
    • getFailureKeyAttribute

      public String getFailureKeyAttribute()
      Gets the failure key attribute.
      Returns:
      the failure key attribute
    • setFailureKeyAttribute

      public void setFailureKeyAttribute(String value)
      Sets the failure key attribute.
      Parameters:
      value - the new failure key attribute
    • onAccessDenied

      protected boolean onAccessDenied(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws Exception
      Specified by:
      onAccessDenied in class org.apache.shiro.web.filter.AccessControlFilter
      Throws:
      Exception