Developing a custom authentication through EZPublish 3+

Author Message

Lazaro Ferreira

Wednesday 18 August 2004 1:30:51 am

We provide our EZP hosted clients with external statistics. In order to view their statistics they should authenticate via httpd.

To avoid keeping two accounts for each EZP hosted client (one for EZP itself, and the other one to access their statistics ), we would like to extend EZP authentication as follows:

The user enter an URL like mydomain.com/stats, then he is presented with EZP login page, after authentication the user should be redirected to an external URL where actual statistics are show, behind the scene httpd authentication should be conducted using php CURL library or alike

How can we approach this using EZP 3+ ?

Thanks
Lazaro Ferreira

Lazaro
http://www.mzbusiness.com

Bård Farstad

Wednesday 18 August 2004 2:05:38 am

Lazaro, I think the simplest way of doing this would be to write your own eZ publish module. Once you have the module you get the permission system for free. The module would simply read the html pages and outputs them in a template. You can e.g. use an iframe if you want to include them in the same page, or you could just terminate the eZ publish processing once the html page is served.

--bård

Documentation: http://ez.no/doc

Lazaro Ferreira

Wednesday 18 August 2004 2:54:54 am

Hi,

Writing an EZP module means writing an EZP extension ?

Thanks
Lazaro

Lazaro
http://www.mzbusiness.com

Bård Farstad

Wednesday 18 August 2004 2:59:05 am

Lazaro,

Yes, you can write this as an extension. There are some information on how to do that here.

http://ez.no/ez_publish/documentation/development/extensions/module/hello_world

If you're stuck just ask and we'll try to help.

--bård

Documentation: http://ez.no/doc

Lazaro Ferreira

Friday 20 August 2004 4:18:32 am

Hi,

We got the module extension working, now we would like to assign a custom SiteDesign to this module extension

We have overrided the pagelayout.tpl under override/templates/mymodule/myview without success

Thanks
Lazaro

Lazaro
http://www.mzbusiness.com

Bård Farstad

Friday 20 August 2004 4:54:48 am

Lazaro,

you can set the pagelayout you want to have for the module by defining the following then you return the module result:

$Result['pagelayout'] = 'my_nice_pagelayout.tpl';

The template for pagelayout must not be under your module. It needs to be in templates/my_nice_pagelayout.tpl. This can be put in a design extension if you like.

You can have a look at the code for kernel/layout/set.php, this does change the pagelayout file.

--bård

Documentation: http://ez.no/doc

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.