cancel
Showing results for 
Search instead for 
Did you mean: 

Alternate login for webscripts in iframe?

ashex
Champ in-the-making
Champ in-the-making
Would it be possible to have an alternative login page for a webscript that's been embedded in a site via iframe? I'm developing a document library "widget" that would be added to a site, the problem I'm running into is if you're not logged in you get the standard login. Due to how the site was designed, you have to scroll halfway down the page to find the login.

Being able to launch a pop-up window (or show a button to launch it) for login would solve this.
4 REPLIES 4

ddraper
World-Class Innovator
World-Class Innovator
The login page is configured in the WEB-INF/surf.xml (look for the definition of the "login" page-type) and is currently set to the "slingshot-login" page. You can override this to define any login page that you'd like. This blog post describes how to do it: http://blogs.alfresco.com/wp/developer/2011/11/03/advanced-share-customization-part-2/

ashex
Champ in-the-making
Champ in-the-making
I see, so you can only have one login page that is used globally? If that's the case then I'll have to use javascript to handle this.

ddraper
World-Class Innovator
World-Class Innovator
No, I don't think that's necessarily true. The login page is where you get redirected when it's detected that the current user is no longer authenticated (e.g. their session has timed out). There's nothing to stop you creating a new page for a user to provide authentication credentials - I thought you just wanted to replace the existing login page. The greater challenge will be to determine where to redirect unauthenticated users as the default would be back to the main login page, if you want differing behaviour based on the users current context (e.g. that the user is viewing Alfresco through an iFrame) then that is a different issue. It's possible to set a redirectUrl on logout (which I think will be triggered on session timeouts as well).

ashex
Champ in-the-making
Champ in-the-making
I see what you mean, in this scenario I'm looking for different behavior when a user is viewing Alfresco through an iFrame. The real reason I want to do this is Chrome really hates iframes as it blocks communication between frames, this error seems to suggest this:


Sandbox access violation: Blocked a frame at "https://alfresco.domain.com" from accessing a frame at "null".  Both frames are sandboxed and lack the "allow-same-origin" flag.

Since the site is on a separate domain I've disabled X-Frame-Options (Chrome doesn't respect Allow-From).

Being able to launch a separate window for login would resolve this.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.