How do I access login information in Hybris?

1k Views Asked by At

I need to extend my Backoffice login form and add two new fields to it. Then I need to access the login info in my Java code.

Extending Backoffice Login Page says I need to use LoginInformationHandler.

I haven't found information on how to do this. Should I inject it as Spring bean? I can't see configuration for it in spring-xml files in my application or OOTB. The only constructor available needs TypedSettingsMap loginInfo, which would just create new LoginInfoHandler or something like that.

So, what's the solution for this?

1

There are 1 best solutions below

9
On BEST ANSWER

Yes, LoginInformationHandler is a service that you can inject into your service / facade.

Then, you would need to get the data like this:

loginInformationHandler.getLoginInformation(“tenant”);