Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-413

init() method is not called on class that implements org.apache.shiro.util.Initializable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Configuration
    • Labels:
      None

      Description

      Classes configured in shiro.ini that implement the "Initializable" interface should automatically have their "init()" methods called. It appears this call is not always occurring. Example below:

      public class WaffleNegotiateAuthFilter extends BasicHttpAuthenticationFilter
      implements Initializable
      {
      ...

      private final NegotiateSecurityFilter negotiateFilter;

      public WaffleNegotiateAuthFilter()

      { negotiateFilter = new NegotiateSecurityFilter(); }

      @Override
      protected void onFilterConfigSet() throws Exception

      { negotiateFilter.init(getFilterConfig()); }

      /**

      • Initializes this object.
        *
      • @throws org.apache.shiro.ShiroException
      • if an exception occurs during initialization.
        */
        public void init() throws ShiroException
        Unknown macro: { try { super.init(getFilterConfig()); } catch (ServletException e) { throw new ShiroException(e); } }

        ...

      I still do not see the init() method being called.

      See this thread for more details: http://shiro-user.582556.n2.nabble.com/AuthenticatingFilter-lifecycle-when-used-in-urls-td7578146.html

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bhamail Dan Rollo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: