Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-97090

AutoLogins are ignoring their ranking so there's no way to define their executing order

Details

    Description

      Currently autoLogin implemented classes are executed from AutoLoginFilter following the order in which they were registered, ignoring their service.ranking

      Steps to Reproduce:

      1. Create and deploy a new AutoLogin with service.ranking 100, for example. Use the following one as an example:
        @Component(immediate = true, service = AutoLogin.class,
        property = {
            "service.ranking:Integer=100"
        })
        public class MyAutoLogin extends BaseAutoLogin {
        
            @Override
            protected String[] doLogin(
                    HttpServletRequest request, HttpServletResponse response)
                throws Exception {
        
                return null;
            }
        
        }
        
      1. Execute the following script to check autologin order:
        import com.liferay.portal.kernel.security.auto.login.AutoLogin;
        import com.liferay.portal.servlet.filters.autologin.AutoLoginFilter;
        
        for(AutoLogin autologin: AutoLoginFilter._autoLogins) {
            out.println(autologin);
        }
        

      Expected Results:

      The new autologin should appear first among the registered ones.

       

      Actual Results:

      The new autologin appears in the order that was registered.

      Attachments

        Activity

          People

            summer.zhang Summer Zhang
            mariano.alvaro Mariano Álvaro
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 46 weeks, 2 days ago

              Packages

                Version Package
                7.0.0 DXP FP85
                7.0.10.12 DXP SP12
                7.0.X
                7.1.10 DXP FP13
                7.1.X
                7.2.10 DXP FP1
                7.2.1 CE GA2
                7.2.X
                7.3.10 DXP GA1
                Master