Search code examples
sap-commerce-cloudbackoffice

How do I access login information in Hybris?


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?


Solution

  • 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”);