Liferay 6.2 Auth Type: BASIC Web.xml has entries:
<security-constraint>
<web-resource-collection>
<web-resource-name>/c/portal/protected</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>PAdministrator</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>PAdministrator</role-name>
</security-role>
Tomcat User .xml:
<user username="MyPortalUser" password="xxxxxxxx" roles="PAdministrator"/>
After Tomcat restart : Browser throws up Popup asking for credentials. However when i say request.getPrincipal() it always returns userid of the default portal user account, I am interested in getting logged in username not the mapping ID in portal DB.
Have also tried fetching the user from ThemeDisplay.getUser(), This always returns the id of the default user and not the logged in user.?
Is there any other way of extracting user name ? or am i missing something?
Appreciate any help? Thanks