掲示板

Custom login portlet

12年前 に lipsa mishra によって更新されました。

Custom login portlet

New Member 投稿: 14 参加年月日: 11/07/15 最新の投稿
Hi all,

I want to use my own custom login portlet. by cliking on signin link &
i am redirected to my custom login portlet by using below lines in portal-ext.properties

auth.login.url=/web/guest/login

auth.login.portlet.name=Atyaf-Login

my custom portlet is having one Email-id field and one password field.

Now the problem is that when i am logging with test@liferay.com its not logging in.

Will anyone plz help me how to login a user through my own custom portlet.
12年前 に Ugandhar Reddy によって更新されました。

RE: Custom login portlet

Junior Member 投稿: 25 参加年月日: 11/11/21 最新の投稿
Hi Lipsa

Once you forward to the custom login portlet then you need to call liferay API in your custom login portlet ProcessAction() method and redirect to the home page which you have created.

in Liferay4.x we are using below API to call the liferay loginService.

LoginAction.login(httpReq, httpRes, UserId, Password, false);

But in Liferay6.x i feel they have change the liferay API like below.

LoginUtil.login(HttpServletRequest request, HttpServletResponse response, String login, password, boolean rememberMe, String authType)-- which gives an option to send login value as emailId by specifying authType="emailAddress".


Once you authenticated with any of the above liferay API method you can redirect to your home page.

NOTE: depends on your Liferay version you need to find the Liferay Login API params.
12年前 に lipsa mishra によって更新されました。

RE: Custom login portlet

New Member 投稿: 14 参加年月日: 11/07/15 最新の投稿
Hi Ugandhar ,

Thanks for your valuable feedback
We have created a portlet. In that portlet we are not able to access the LoginUtil which I suppose is in portal-impl.jar.
And I think we cannot access the classes of portal-impl.jar directly.
Is there any other way to make the user login in the portal.


Thanks

lipsa
12年前 に Ugandhar Reddy によって更新されました。

RE: Custom login portlet

Junior Member 投稿: 25 参加年月日: 11/11/21 最新の投稿
Hi lipsa

we are using Ext environment so portal-impl.jar will be present and we imported the class directly and used it.
i think if we are using plugin environment then you can copy portal-impl.jar to your lib.

in Liferay6 we can use Hooks, as of now i am not having more idea on this.
thumbnail
12年前 に srikanth a によって更新されました。

RE: Custom login portlet

Regular Member 投稿: 144 参加年月日: 11/02/21 最新の投稿
Hi Lipsa,
Try using the UserLocalServiceUtil class to authenticate the user and then forward to the required jsp.


regards
Sri
12年前 に Paul Cheong によって更新されました。

RE: Custom login portlet

New Member 投稿: 10 参加年月日: 05/08/03 最新の投稿
I have the same issue.

I have tried to use UserLocalServiceUtil class to do the authentication, the authentication is success but when I forward to home page, liferay seems cannot regconize the user is logged in. Any paramenter should be set to session to let liferay know that the user is logged in?
12年前 に vijay k によって更新されました。

RE: Custom login portlet

New Member 投稿: 4 参加年月日: 12/03/06 最新の投稿
I was writing my own custom portlet for login process and I thought that as long as I call LoginUtil.login (from portal-impl.jar.) it will log me in. Then I realized that you can't have custom portlets using portal-impl.jar.

I think you can do it the ext plugin way, which I haven't tried.

But the following worked for me.

You can still use the service/method calls in portal-impl.jar from your custom portlets using PortalClassInvoker (from portal-service.jar located in tomcat/lib/ext), as follows (Thanks to Gordon Augat for telling me about this)
MethodKey key = new MethodKey("com.liferay.portlet.login.util.LoginUtil", "login", HttpServletRequest.class, HttpServletResponse.class, String.class, String.class, boolean.class, String.class);
PortalClassInvoker.invoke(false, key, new Object[] { PortalUtil.getHttpServletRequest(portletRequest), PortalUtil.getHttpServletResponse(portletResponse), username, password false, null});

after this redirect to,

ThemeDisplay().getPathMain()


I don't want to go into details but, there is some classloader hierarchy/visibility magic happening here.

But, I had to do couple of more things to make it work.

1. set this in external portal properties file. I think it depends on what you are using to create custom portlets. I was using Vaadin and if I had this to true, the login process was invalidating the session, which was making my vaadin application freak out on me.

session.enable.phishing.protection=false



Even after that my login didn't work. The LoginUtil.login method was being called correctly but I am still getting the login screen.

2.in liferay-portlet.xml, set the following. It took me couple of days to figure this out.

 <private-session-attributes>false</private-session-attributes> 

**NOTE: Liferay expects the <tags> in liferay-portlet.xml in certain order, otherwise it is barfing on me.

The Login process was like this, LoginUtil.login does its work and the com.liferay.portal.servlet.MainServlet.loginUser was making the login stick for the session by looking for some attributes ("j_remoteuser", "j_username" and few others) set by LoginUtil.login. The problem I had with my process was , when I call the LoginUtil.login method, it is setting lots of stuff in session object (gets from the request object I was sending) The session it was setting all of those was a PORTLETSESSION instance and MainServlet is looking into PORTALSESSION. So, I had to make sure that there is no private portlet session for my custom login portlet and have it use the portal session.

And that worked for me.


Hope that helps
12年前 に tian ci によって更新されました。

RE: Custom login portlet

New Member 投稿: 1 参加年月日: 12/03/19 最新の投稿
Hi Vijay,

I followed your method of implementation but I've encountered an exception stating "Invalid Authentication Token" after i send redirect to themeDisplay.gethPathMain(). On further troubleshooting from liferay src, it was thrown by the check() method in class com.liferay.portal.security.auth.SessionAuthToken. Apparently, the program is looking for a parameter "p_auth" from the request but it was not present.

vijay k:
I was writing my own custom portlet for login process and I thought that as long as I call LoginUtil.login (from portal-impl.jar.) it will log me in. Then I realized that you can't have custom portlets using portal-impl.jar.

I think you can do it the ext plugin way, which I haven't tried.

But the following worked for me.

You can still use the service/method calls in portal-impl.jar from your custom portlets using PortalClassInvoker (from portal-service.jar located in tomcat/lib/ext), as follows (Thanks to Gordon Augat for telling me about this)
MethodKey key = new MethodKey("com.liferay.portlet.login.util.LoginUtil", "login", HttpServletRequest.class, HttpServletResponse.class, String.class, String.class, boolean.class, String.class);
PortalClassInvoker.invoke(false, key, new Object[] { PortalUtil.getHttpServletRequest(portletRequest), PortalUtil.getHttpServletResponse(portletResponse), username, password false, null});

after this redirect to,

ThemeDisplay().getPathMain()


I don't want to go into details but, there is some classloader hierarchy/visibility magic happening here.

But, I had to do couple of more things to make it work.

1. set this in external portal properties file. I think it depends on what you are using to create custom portlets. I was using Vaadin and if I had this to true, the login process was invalidating the session, which was making my vaadin application freak out on me.

session.enable.phishing.protection=false



Even after that my login didn't work. The LoginUtil.login method was being called correctly but I am still getting the login screen.

2.in liferay-portlet.xml, set the following. It took me couple of days to figure this out.

 <private-session-attributes>false</private-session-attributes> 

**NOTE: Liferay expects the <tags> in liferay-portlet.xml in certain order, otherwise it is barfing on me.

The Login process was like this, LoginUtil.login does its work and the com.liferay.portal.servlet.MainServlet.loginUser was making the login stick for the session by looking for some attributes ("j_remoteuser", "j_username" and few others) set by LoginUtil.login. The problem I had with my process was , when I call the LoginUtil.login method, it is setting lots of stuff in session object (gets from the request object I was sending) The session it was setting all of those was a PORTLETSESSION instance and MainServlet is looking into PORTALSESSION. So, I had to make sure that there is no private portlet session for my custom login portlet and have it use the portal session.

And that worked for me.


Hope that helps
thumbnail
12年前 に Srikanth Reddy Sanivarapu によって更新されました。

RE: Custom login portlet

Regular Member 投稿: 203 参加年月日: 08/11/15 最新の投稿
Hi All,

I am getting the below exception after I deploy the code which they have given above.

java.lang.NoSuchMethodException: com.liferay.portlet.login.util.LoginUtil.login(com.liferay.portal.servlet.NamespaceServletRequest, com.liferay.portal.servlet.filters.strip.Stri
pResponse
, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String)

Here is my code :
PortletRequest portletRequest = (PortletRequest)actionRequest;
PortletResponse portletResponse = (PortletResponse)actionResponse;

HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(portletRequest);
HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(portletResponse);

System.out.println("httpRequest--->" + httpRequest);
System.out.println("httpResponse--->" + httpResponse);

PortalClassInvoker.invoke("com.liferay.portlet.login.util.LoginUtil", "login",
new Object[] { httpRequest, httpResponse, "test@liferay.com", "test", false, CompanyConstants.AUTH_TYPE_EA});


Can any one help me with the correct way of getting HttpServletRequest Object and HettpServletResponse Object from actionReqeust and actionResponse objects in my processAction method.

Any help is really appreciated. Thanks in advance.

Regards,
Srik
12年前 に vijay k によって更新されました。

RE: Custom login portlet

New Member 投稿: 4 参加年月日: 12/03/06 最新の投稿
It all depends on which liferay version you are using. I am using 6.1 GA1.

My approach involved looking into the Liferay's core login process

which involves
1. calling a struts action mapped to "com.liferay.portal.action.LoginAction", which inturn makes a call to
2. LoginUtil.login(request, response, login, password, rememberMe, authType);

So, my idea was to duplicate the process by calling (LoginUtil.login(request, response, login, password, rememberMe, authType)). Hence, the following code.

MethodKey key = new MethodKey("com.liferay.portlet.login.util.LoginUtil", "login", HttpServletRequest.class, HttpServletResponse.class, String.class, String.class, boolean.class, String.class);
PortalClassInvoker.invoke(false, key, new Object[] { PortalUtil.getHttpServletRequest(portletRequest), PortalUtil.getHttpServletResponse(portletResponse), username, password false, null});
.

So, based on the problem (java.lang.NoSuchMethodException) you are having, I am thinking that you have a different version of liferay and it probably is not doing the same thing for the core login process. If that is the case, look into the core login struts action (most likely the same class "LoginAction") and see what it is doing.
11年前 に Jasar Muhiyudheen によって更新されました。

RE: Custom login portlet

New Member 投稿: 3 参加年月日: 12/04/30 最新の投稿
Hi,

I got the same issue and I am following the same way you mentiooned.

---------------------------------------------------------------
I have an index.jsp page where I have the following code.

MethodKey key = new
MethodKey("com.liferay.portlet.login.util.LoginUtil", "login",
HttpServletRequest.class, HttpServletResponse.class,
String.class, String.class, boolean.class, String.class);

PortalClassInvoker.invoke(false, key, new Object[] { request,
response, "monet", "m", true, "screenName"});

response.sendRedirect("http://localhost:9090/group/guest/home");
-----------------------------------------------------------------

In /liferay_portal_6.1/portlet-ext.properties I set 'session.enable.phishing.protection=false'

Since index.jsp is a normal jsp page, I cannot set '<private-session-attributes>false</private-session-attributes>' in liferay-portal.xml.

But still when I try to redirect to 'http://localhost:9090/group/guest/home', It goes to the login screen. I was getting some authentication exception which I solved. Now I think the user is getting autheticated but it redirects to the login screen again.

Please help me on this.

Thanks,
Jasar
11年前 に vijay k によって更新されました。

RE: Custom login portlet

New Member 投稿: 4 参加年月日: 12/03/06 最新の投稿
I don't understand what you meant by "............index.jsp is a normal jsp page, I cannot set <private-session-attributes>false</private-session-attributes>...............".

The setting is at the portlet level. Whether it is a jsp or some java code in an action/web-layer class that is doing the custom login process, it is part of your custom portlet. And that portlet should not have a private session (it has to use the same session as the portal), which is exactly what the setting "<private-session-attributes>" does. If your portlet has a private session, Liferay's MainServlet won't find the information it requires to log the user in, because it looks in the PORTAL SESSION and the login process that you called from your code, sets the information in the PORTLET SESSION that it gets from the request object you are passing in. In my case I have a Custom Login portlet with one UI component(I am using Vaadin instead of JSP in your case) and all it does is, shows the login page, do the custom login process and redirect to some place.
11年前 に Jasar Muhiyudheen によって更新されました。

RE: Custom login portlet

New Member 投稿: 3 参加年月日: 12/04/30 最新の投稿
In my war file there is no portlet. My war file contains only index.jsp. From that index.jsp I am calling LoginUtil.login method and redirects to 'http://localhost:9090/group/guest/home'. So I am not sure where to set <private-session-attributes>false</private-session-attributes>, since my liferay-portal.xml doesn't contain a <portlet> tag.
thumbnail
11年前 に Paul . によって更新されました。

RE: Custom login portlet

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
For authentication token , checkout the properties under
##
## Authentication Token
##

#
# Set this to true to enable authentication token security checks. The
# checks can be disabled for specific actions via the property
# "auth.token.ignore.actions" or for specific portlets via the init
# parameter "check-auth-token" in portlet.xml.
#
in portal.properties and you can make changes accordingly in portal-ext or even better in portlet.xml of your custom portlet

am gonna try this implementation and see how it works. Looks interesting. Till now I have used the autologin hooks for such situations.
thumbnail
11年前 に Paul . によって更新されました。

RE: Custom login portlet

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
I finally got some time to try it out with Liferay 6.1 GA2
The only change except for other things discussed in this thread is that another property is to be added to portal-ext.properties
session.enable.phishing.protection=false

without this I was getting NPE when implementation tries to add session messages.
thumbnail
11年前 に Mazhar Alam によって更新されました。

RE: Custom login portlet

Regular Member 投稿: 191 参加年月日: 11/11/25 最新の投稿
helpful post...
11年前 に Jasar Muhiyudheen によって更新されました。

RE: Custom login portlet

New Member 投稿: 3 参加年月日: 12/04/30 最新の投稿
Still I am facing the same issue. No exception but user not getting in.

I have the settings in portal-ext.properties (session.enable.phishing.protection=false)
and in liferay-portlet.xml (<private-session-attributes>false</private-session-attributes> )

Even after that my login didn't work. The LoginUtil.login method was being called correctly but I am still getting the login screen.

my login code is inside portlet class.

try {
PortalClassInvoker.invoke(false, key, new Object[] { PortalUtil.getHttpServletRequest(request),
PortalUtil.getHttpServletResponse(response), "monet", "m", true, "screenName"});
response.sendRedirect("http://localhost:9090/group/guest/home");

} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

I am using Liferay 6.1-ce-ga1


Please help me out

Thanks,
Jasar
thumbnail
11年前 に Bart Simpson によって更新されました。

RE: Custom login portlet

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
It worked for me when I tried, but it was on Liferay EE. Can you check:-
1. Debug the method LoginUtil.login and check the flow
2. After the request completes, open http://localhost:9090/group/guest/home in another tab and check if you are logged in
thumbnail
11年前 に Ken Driscoll によって更新されました。

RE: Custom login portlet

Junior Member 投稿: 57 参加年月日: 12/07/02 最新の投稿
Hello, I have followed this but am still having issues. I am using Liferay 6.1 GA1 and I am receiving no errors when it runs. However, it simply isn't logging me in.

Here is what I have:

MethodKey key = new MethodKey("com.liferay.portlet.login.util.LoginUtil", "login", HttpServletRequest.class, HttpServletResponse.class, String.class, String.class, boolean.class, String.class);
PortalClassInvoker.invoke(false, key, new Object[] { PortalUtil.getHttpServletRequest(actionRequest), PortalUtil.getHttpServletResponse(actionResponse), "user@test.com", "password", false, CompanyConstants.AUTH_TYPE_EA});


Please let me know if anyone else has had the same issue, or for any other ideas on how to get this working!

Thank you in advance.

vijay k:
I was writing my own custom portlet for login process and I thought that as long as I call LoginUtil.login (from portal-impl.jar.) it will log me in. Then I realized that you can't have custom portlets using portal-impl.jar.

I think you can do it the ext plugin way, which I haven't tried.

But the following worked for me.

You can still use the service/method calls in portal-impl.jar from your custom portlets using PortalClassInvoker (from portal-service.jar located in tomcat/lib/ext), as follows (Thanks to Gordon Augat for telling me about this)
MethodKey key = new MethodKey("com.liferay.portlet.login.util.LoginUtil", "login", HttpServletRequest.class, HttpServletResponse.class, String.class, String.class, boolean.class, String.class);
PortalClassInvoker.invoke(false, key, new Object[] { PortalUtil.getHttpServletRequest(portletRequest), PortalUtil.getHttpServletResponse(portletResponse), username, password false, null});

after this redirect to,

ThemeDisplay().getPathMain()


I don't want to go into details but, there is some classloader hierarchy/visibility magic happening here.

But, I had to do couple of more things to make it work.

1. set this in external portal properties file. I think it depends on what you are using to create custom portlets. I was using Vaadin and if I had this to true, the login process was invalidating the session, which was making my vaadin application freak out on me.

session.enable.phishing.protection=false



Even after that my login didn't work. The LoginUtil.login method was being called correctly but I am still getting the login screen.

2.in liferay-portlet.xml, set the following. It took me couple of days to figure this out.

 <private-session-attributes>false</private-session-attributes> 

**NOTE: Liferay expects the <tags> in liferay-portlet.xml in certain order, otherwise it is barfing on me.

The Login process was like this, LoginUtil.login does its work and the com.liferay.portal.servlet.MainServlet.loginUser was making the login stick for the session by looking for some attributes ("j_remoteuser", "j_username" and few others) set by LoginUtil.login. The problem I had with my process was , when I call the LoginUtil.login method, it is setting lots of stuff in session object (gets from the request object I was sending) The session it was setting all of those was a PORTLETSESSION instance and MainServlet is looking into PORTALSESSION. So, I had to make sure that there is no private portlet session for my custom login portlet and have it use the portal session.

And that worked for me.


Hope that helps
11年前 に Phap Phan によって更新されました。

RE: Custom login portlet

New Member 投稿: 5 参加年月日: 12/03/27 最新の投稿
I'm having the exact problem.

I'm currently running on Liferay 6.1.0 CE GA1 and want to create a custom login portlet. I followed your instructions but after click the button to log in, Liferay just doesn't let the user go through.
thumbnail
11年前 に Robert Seedorff によって更新されました。

RE: Custom login portlet

New Member 投稿: 3 参加年月日: 10/12/16 最新の投稿
thx for your post, helped me alot!
thumbnail
11年前 に David Pereira によって更新されました。

RE: Custom login portlet

New Member 投稿: 11 参加年月日: 12/05/23 最新の投稿
Muchas gracias, esto me ha ayudado mucho. Thanks!
11年前 に Ime Prezime によって更新されました。

RE: Custom login portlet

New Member 投稿: 4 参加年月日: 13/03/07 最新の投稿
Doesn't work for me.

I'm using Liferay 6.1.1 CE GA2.
I have custom JSF-based portlet.

LoginUtil.login method is executed, but nothing happens after that.

Property session.enable.phishing.protection is false.
Tag <private-session-attributes> in liferay-portlet.xml is false.

Any hints?
Maybe I'm passing wrong HttpServletRequest and HttpServletResponse objects?

Relevant code:
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
        
PortletRequest portletRequest =  (PortletRequest) externalContext.getRequest();
PortletResponse portletResponse =  (PortletResponse) externalContext.getResponse();
        
HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(portletRequest);
HttpServletResponse httpServletResponse = PortalUtil.getHttpServletResponse(portletResponse);

String username = "test";
String password = "test";
boolean rememberMe =false;
        
MethodKey methodKey = new MethodKey(
         "com.liferay.portlet.login.util.LoginUtil",
         "login",
         HttpServletRequest.class,
         HttpServletResponse.class,
         String.class,
         String.class,
         boolean.class,
         String.class );
        
String authType = CompanyConstants.AUTH_TYPE_SN;
        
PortalClassInvoker.invoke(
         false,
         methodKey, 
         new Object[] { 
                 httpServletRequest,
                 httpServletResponse,
                 username,
                 password,
                 rememberMe,
                 authType } );
thumbnail
11年前 に Neil Griffin によって更新されました。

RE: Custom login portlet

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Does your customer JSF Login portlet work if private-session-attributes=true (the default) and with a new out-of-the-box installation of Liferay Portal where session.enable.phishing.protection=false (the default)?
11年前 に Ime Prezime によって更新されました。

RE: Custom login portlet

New Member 投稿: 4 参加年月日: 13/03/07 最新の投稿
Thanks for advice.

I tried fresh Liferay + JBoss 6.1.1 bundle.
I used Liferay Maven archetype to create simple JSF portlet plugin with only one portlet.
Portlet has a simple xhtml and simple view-scoped JSF bean with action from my previous post.

The behaviour is always the same, no matter how I set:
<private-session-attributes> in liferay-portlet.xml, or
session.enable.phishing.protection in portal-setup-wizard.properties.
Yes, I also tried the default combination, as you suggested.

Behaviour:
- If I enter correct screenname and password, action passes without errors. But, portal doesn't behave the same as with Liferay's login portlet when login is successful. ThemeDisplay.isSignedIn() method always returns false.
- If I enter incorrect screenname or password, I get AuthException from LoginUtil.login() method, which is expected.

Is there any custom login demo WAR which I can try?
thumbnail
11年前 に Vernon Singleton によって更新されました。

RE: Custom login portlet

Expert 投稿: 315 参加年月日: 13/01/14 最新の投稿
Ime Prezime:
Is there any custom login demo WAR which I can try?


We ran into a similar problem in our testing with an older version of mojarra (i think it was mojarra 2.1.3 ..)

You will find a fairly recent version of a login portlet war in this snapshot directory:
https://oss.sonatype.org/content/repositories/snapshots/com/liferay/faces/demos/jsf2-login-portlet/3.1.2-ga3-SNAPSHOT/

You will also need to follow Stan Silvert's instructions for upgrading jboss's global class path with a newer version of mojarra ...
for this war you might as well use mojarra version 2.1.20.
Here are Stan's instructions:
https://community.jboss.org/message/756572#756572

Hope that helps,
Vernon
11年前 に Ime Prezime によって更新されました。

RE: Custom login portlet

New Member 投稿: 4 参加年月日: 13/03/07 最新の投稿
This JSF login portlet demo is great. I tried it, and it worked.

I used ideas from it's source code to modify my own login portlet, which worked too after I used the same way to get HttpServletRequest and HttpServletResponse objects.

Thank you!
thumbnail
11年前 に Vijaya Kumar Mukthala によって更新されました。

RE: Custom login portlet

New Member 投稿: 16 参加年月日: 12/09/13 最新の投稿
Hi All,

I am new to liferay portal, currently i am working on liferay 6.1 EE with JSF primefaces , the above discussion is regarding the custom login portlet , i would like know when we will for Custom login portlet , we have already login portlet is available in lifeay.

Thanks and Regards
Vijay
thumbnail
11年前 に Vernon Singleton によって更新されました。

RE: Custom login portlet

Expert 投稿: 315 参加年月日: 13/01/14 最新の投稿
Kumar M:
I am new to liferay portal, currently i am working on liferay 6.1 EE with JSF primefaces , the above discussion is regarding the custom login portlet , i would like know when we will for Custom login portlet , we have already login portlet is available in lifeay.


Hi Vijay,

Are you using Liferay with Tomcat? Jboss? Or some other configuration?
You may not have a need for a custom login portlet, but if you do, let me know.

- Vernon
thumbnail
11年前 に Kumar M によって更新されました。

RE: Custom login portlet

New Member 投稿: 16 参加年月日: 12/09/13 最新の投稿
Hi Vernon,

I am using Tomcat.
I am not customizing the login portlet i want to know when we will go for customizing the login portlet.(any extra features)

Thanks
Vijay
thumbnail
11年前 に Vernon Singleton によって更新されました。

Re: [Liferay Forums][3. Development] RE: Custom login portlet

Expert 投稿: 315 参加年月日: 13/01/14 最新の投稿
Well, you will go for customizing when the need arises. Maybe you will
want to change the flow of the login process, maybe change the options for
a first time login, or whatever your company or organization needs.

- Vernon



On Fri, Mar 15, 2013 at 10:17 AM, Kumar M from liferay.com <
forums@liferay.com> wrote:

> Hi Vernon,
>
> I am using Tomcat.
> I am not customizing the login portlet i want to know when we will go for
> customizing the login portlet.(any extra features)
>
> Thanks
> Vijay
>
>
> To view the thread, follow the link below:
>
> http://www.liferay.com/community/forums/-/message_boards/view_message/22677817
> --
> Thanks, Liferay.com Forums <http://http://www.liferay.com>
thumbnail
11年前 に Nilesh Gundecha によって更新されました。

RE: Custom login portlet

Regular Member 投稿: 205 参加年月日: 09/12/01 最新の投稿
Hi Friends,

I have implemented the Custom Login portlet and did all the steps as mentioned by Vijay K. All works fine except one strange issue -

If I load the page having my custom portlet and don't do anything for sometime (say half an hour) and then try to login then it gives me Forbidden status. I am not able to make out whats the issue. Any inputs please?

Regards,
Nilesh

添付ファイル:

thumbnail
11年前 に Nilesh Gundecha によって更新されました。

RE: Custom login portlet

Regular Member 投稿: 205 参加年月日: 09/12/01 最新の投稿
Can this happen because Liferay Login portlet and my Custom Login portlet as co-existing on the same page? Will they generate different auth token and so the issue?
thumbnail
10年前 に Christophe Cariou によって更新されました。

RE: Custom login portlet

Junior Member 投稿: 57 参加年月日: 07/10/01 最新の投稿
Hi vijay,

I used your method and it's working fine. I'm in the same context as you (Liferay 6.1 GA2 + Vaadin), except I'm on Vaadin 7.

The login action is correctly done and I redirect the user after login on a private page. All is fine.

BUT :
- If I close my browser after being logged in, without login out, and reopen it on the custom login page, the Vaadin portlet doesn't display at all !
Any other Vaadin portlet on public pages don't display at all.
I haven't any exception... just blank portlet (bootstrap code is present in the page).

To retrieve the portlets I must call a c/portal/logout url.

So, have you tested this case (closing browser after login and reopening the custom login page) and did you encounter the same trouble ?
If so, how did you correct it? perhaps via somme Vaadin session invalidation ?

Your help wilp be great for me.

Christophe
9年前 に Abdulbasit Shaikh によって更新されました。

RE: Custom login portlet

New Member 投稿: 18 参加年月日: 13/05/16 最新の投稿
Hi vijay k,

Thank you very very much. I was trying since last 3 days. Finally it worked for me. Thank you so much. But the only problem now is I am not able to redirect it to my custom liferay page.

Thanks and Regards,
Abdulbasit F Shaikh.
thumbnail
9年前 に Tariqul Islam によって更新されました。

RE: Custom login portlet

New Member 投稿: 15 参加年月日: 13/01/27 最新の投稿
I also faced this problem and finaly solve this issue.

Here below my blog link this may help...

http://tariqliferay.blogspot.com/2015/02/custom-login-portet-in-liferay.html