shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (SHIRO-413) init() method is not called on class that implements org.apache.shiro.util.Initializable
Date Sun, 12 Apr 2015 03:46:12 GMT

     [ https://issues.apache.org/jira/browse/SHIRO-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Les Hazlewood closed SHIRO-413.
-------------------------------

> init() method is not called on class that implements org.apache.shiro.util.Initializable
> ----------------------------------------------------------------------------------------
>
>                 Key: SHIRO-413
>                 URL: https://issues.apache.org/jira/browse/SHIRO-413
>             Project: Shiro
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.2.1
>            Reporter: Dan Rollo
>            Assignee: Les Hazlewood
>            Priority: Critical
>             Fix For: 1.2.2, 1.3.0
>
>
> 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 {
>         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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message