Featured post

Docker setup for Liferay 7 with MySQL

Monday, 11 September 2017

Auto Login Liferay 7 \ Lliferay DXP

Auto Login : Auto login is a feature that allows you to login automatically!


Few of available Auto Login types in Liferay 7 \ Liferay DXP :

  • Basic Authentication
  • Request Header
  • Parameter
  • Remember Me


Basic Authentication Header Auto Login
    To know about basic authentication, please follow this link.

Basic authentication[username + password] can be passed in headers for auto login.
Create a config file named  "com.liferay.portal.security.auto.login.basic.auth.header.module.configuration.BasicAuthHeaderAutoLoginConfiguration.cfg".


enabled=true


To deploy, copy corresponding [.cfg] \ config file to osgi/config or osgi/modules folder.
You can test it through postman like utilities!

Request Header Auto Login

    It requires screen name in request header, header key name would be - "LIFERAY_SCREEN_NAME"
Config file >  "com.liferay.portal.security.auto.login.request.header.module.configuration.RequestHeaderAutoLoginConfiguration.cfg".

We need to make host entries of valid IP's.

enabled=true
authHostsAllowed=127.0.0.1,SERVER_IP
You can also enable ldap import feature from this file!


Test it in similar manner as Basic Authentucation Auto Login.

Request Parameter Auto Login

    For parameter auto login, append these parameters in URL
"?parameterAutoLoginLogin=test@liferay.com&parameterAutoLoginPassword=test"

If you use
"/c/portal/login?parameterAutoLoginLogin=test@liferay.com&parameterAutoLoginPassword=test "
 then it will redirect you to default landing page as well.

Config file >  "com.liferay.portal.security.auto.login.request.parameter.module.configuration.RequestParameterAutoLoginConfiguration.cfg".

enabled=true


To create custom AutoLogin : https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/auto-login#creating-an-auto-login-component

You can also enable\disable\update auto login settings from control panel > Configuration > System Settings > Foundation > [search login]




Note: If you’re running Liferay DE 7.0 Fix Pack 7 or earlier, or Liferay CE Portal 7.0 GA3 or earlier, System Settings exports a .cfg file instead of a .config file. The file format was changed to fix a bug with multi-value settings, which the .cfg format didn’t handle properly. See the bug report for more information. Any Liferay Portal system newer than those listed in this note uses the .config file format.

You are just done, Try & Enjoy the function.............:)

5 comments:

  1. I read the post and I have really enjoyed your blogs posts.looking for the next post.
    Digital Marketing Training In Bangalore.

    ReplyDelete
  2. quite informative, thanks for sharing with us

    if you are interested in reading my blogs
    - http://www.learndigital.co

    ReplyDelete
  3. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.

    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

    ReplyDelete
  4. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.  Matrix Auto Inc

    ReplyDelete