Error caused by replacing LoginProvider

According to the development manual, I replaced LoginPasswordLoginProvider in Spring XML config of the web module.

Screenshot%20from%202018-12-25%2018-51-17
I’ve already processed validation in the ExtAppLoginWindow,Now I need to go straight through the validation.This is my code
Screenshot%20from%202018-12-26%2017-28-41
It catch this Exception
Screenshot%20from%202018-12-26%2017-30-47

Hi,

And what problem did you face? Could you provide app.log file and the complete stacktrace?

Hi,I’ve solved the problem,greateful!

Please do not forget to share your solution, it can help others

Hi, I solved my problem by using AuthenticationProvider as authentication extension points,
Screenshot%20from%202018-12-28%2018-02-07
then imported in the context of the in Spring XML config of the core module
But I’m wondering why it have to make multiple calls, is that a little redundant?
This is the flowchart I summarized:
Login
I known about that it will discard the rest of the redundant operations. So how do I adjust now?

Why do you need component-scan for com.haulmont.cuba.core? It is already scanned by cuba Spring config.

But I’m wondering why it have to make multiple calls, is that a little redundant?

What do you mean exactly? The platform supports pluggable authentication mechanisms, that’s why we need separate supports and authentication calls. It is very usual practice, for instance, Spring Security does the same.

Because the constructor is annotated @Inject.If I don’t do that, an error will be reported,
Screenshot%20from%202018-12-27%2010-08-04
According to the instructions in the Developer’s Manual ,
Screenshot%20from%202018-12-29%2010-00-47
So I’ve replaced the AuthenticationProvider with LoginProvider.