The best way to override login dialog

I found login layout configuration in \server\default\config\dispatch.xml
The xml fragment is:

I probably can change config to set our layout and create new .jsp based on system one.
The disadvantage is that I must be sure that portlet with new login dialog is uploaded to portal. Otherwise it seems that portal will be broken.
Is there a way to override login page, not to replace, just to be sure that portal will work if either my portlet was installed or not yet?
Thanks in advance.

If you want to override the login page, as portal admin go to:
Folders->System->Authentication Schemes->forms

By default, the forms auth scheme is the default auth scheme. You can verify by looking at its aliases and observe that it has the alias: ‘auth.scheme.default’

The forms auth scheme has a redirect URI property which you can point to your default login page, which can be any portal page you want.

You should take care, however, to ensure that your default login page has an instance of the login portlet on it.

Furthermore, each login portlet has a Login-Target property which can either redirect a user logging in to a specific portal page, or leave it empty for the default start page rules to fire.

Hope this helps,
–Mark Imel

Thanks, Mark.
It is exactly what I wanted.

Pavel

Hello, Mark.

One small issue about login dialog.
I was successful to deploy my login portlet.
I also set redirect URI property in Folders->System->Authentication Schemes->forms to my newly created portlet.
When I open new browser window and connect to portal I see overriden login screen and it works in the same manner as default login dialog (exactly as I wanted). I supposed I should get the same overriden dialog after I logged out (using shell links), but I don’t. Instead I see portal page with texts “Welcome to webMethods Portal”, “You’re looking at the default Start Page”, and so on. I tried at this momemt to click ‘Login’ link and after that it shows my login dialog (click count is various from time to time). Should I configurate something else to get my login dialog either at first login and after every logout?

So what you want to do, is modify the default alias of the portal. There is an alias configured by default in the portal: ‘/’ that directs the user to the default start page. You should use the alias management tool to change that alias and point to your start page of choice.

The PortalAdminGuide.pdf has some information regarding setting aliases: PortalConfiguration->Alias Management Portlet

The PortalDesignGuide.pdf talks about some uses of aliases in the portal:
Developing Portal-Based Web Sites and Web Applications->Managing Aliases for your Portal Page

Regards,
–mark imel

Hello, Mark.
In case I configured ‘/’ to point to my portlet, login dialog works fine.
The problem is I need to have different start pages for different users. I tried to configure “Folders > Adminstrative Folders > Administration Dashboard > User Management > User Settings” portlet to adjust user start page, but it seems to not work.

In total, we need to have the same login dialog for every user and different start pages for different users (and/or user groups). Is it possible to be configured?

Thanks in advance,
Pavel

Hi, Pavel.

Last week i gave (and recorded) an internal tech-discussion regarding the configuration of portal splash pages and various redirect options from the portal login. I’m going to find out if i can post that talk up on advantage (and maybe other ones as well).

In the mean time, the short answer for you would be to configure the login portlet redirectURL property to be an alias: ‘/user.current.start.page’ (Note the leading slash) This redirects the user’s to their start pages and allows the StartPage rules to ‘fire’ as you’ve configured them.

Regards,
–mark

Hello, Mark.
Yesterday, I have saw the record you meant. It helped a lot. Now I configured my login page to redirect users to rules based pages. Thank you!

Pavel.

Mark,

I know this is an old thread, but I am trying to setup the same thing as the original post.

I want to replace the standard login page with something a little nicer.

I think I will try to suggest slightly different approach than described in this thread. The idea to create a login page rule for the specific resource in your portal - the root of your application. Then provide users a link to this resource which will show a custom login page specified in the rule. If there is a login error the user will stay on the same page. Upon successful login the user will be routed to the resource he specific in the url - your application.

The last important piece is to report a login error (that is why thread mentioned having wm_login portlet which does it for you) which needs to be implemented if you have your custom login portlet.

The API to obtain a current login error is following. You should be able to code this into a custom portlet of your own and report an error if there is one.

import com.webmethods.portal.framework.IErrorManager;
import com.webmethods.portal.framework.IWebApplication;
import com.webmethods.portal.framework.error.ExceptionBean;
import com.webmethods.portal.framework.error.IExceptionBean;

IErrorManager errorManager = ((IWebApplication)PortalSystem.getWebAppProvider()).getErrorManager();
IContext context = ContextFactory.acquireContext(true);
IExceptionBean eb = (ExceptionBean) errorManager.getExceptionBean(context);
Exception e = eb.getException();

Hi Mark,
I saw your reply to “over-riding login page”.
I am presently developing an application in wM 7.1 in which I want to do the same. I am struck as myself and the team is new to MWS. Can you please help me in this regard.

Wishes,
Ravishankar.

Me too - if you find a way please let me know.

Thank you
Tom

This message provide enough details. Basically you create your own page and could put anything on it. Of course because it has to handle user login it should prompt for username/password/etc. and submit them to the server (via “username” and “password” request params)

If you want to override the login page, as portal admin go to:
Folders->System->Authentication Schemes->forms

By default, the forms auth scheme is the default auth scheme. You can verify by looking at its aliases and observe that it has the alias: ‘auth.scheme.default’

The forms auth scheme has a redirect URI property which you can point to your default login page, which can be any portal page you want.

You should take care, however, to ensure that your default login page has an instance of the login portlet on it.

Furthermore, each login portlet has a Login-Target property which can either redirect a user logging in to a specific portal page, or leave it empty for the default start page rules to fire.

Hope this helps,
–Mark Imel

Hi,

I want to add drop down on default Login page, this drop down will contain the Localization Country+Language(Locale) and I want to send the selected value from drop to internal portal application. Can you please suggest me the way to achieve this.

My requirement is:

  1. How to add drop down on default login page and where & what kind of code changes I need for this.
  2. How to set the selected value of the drop down to the session which I can get into the internal portlet application (API to used for this)
  3. What are the steps to deploy and test those changes.

thanks in advance.

Regards,
Rupesh Chakole

Please see earlier in this thread about how to create your own login page. You can drop in your own locale selector that you create.
Make sure to read this article: http://communities.softwareag.com/ecosystem/communities/public/Developer/webmethods/products/caf/tutorials/links/localizing_web_portlet_applications_fullarticle.html#AL Specifically, look at this section: Managing the Language My webMethods Server Uses for a Portlet Application

You might decide to post a form parameter and use rules to specify the user’s locale.

If you want a programmatic approach you might try this: http://tech.forums.softwareag.com/techjforum/posts/list/23846.page#69336

Or, you might register a new principal attribute provider and use this API: to get and set user attributes: http://communities.softwareag.com/ecosystem/communities/codesamples/webmethods/caf/SAMPLE-20110726235450939.html

Regards,
–mark

Thanks for previous reply.

If I am overriding the Login page will it be deployed under portlet.war or exactly where I need to do the changes for the customized login page.
What will the scope of this Login page parameters.
How can I access the localization language selected from Login page dropdown to the different Portlet application.
When my changes will get reflected.

Thanks,
Rupesh Chakole.

The login page is a folder that you create inside the MWS taxonomy. (eg: “Public folders”)

I think the instructions on how to configure any page to be your login page are earlier in this thread.

I don’t understand your question about scope.

Did you get a chance to try to experiment with any of the information that i sent?