Forums / Developer / Developing a custom authentication through EZPublish 3+

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

eZ debug

Timing: Jan 19 2025 03:29:30
Script start
Timing: Jan 19 2025 03:29:30
Module start 'content'
Timing: Jan 19 2025 03:29:30
Module end 'content'
Timing: Jan 19 2025 03:29:30
Script end

Main resources:

Total runtime0.2045 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1797180.8125
Module start 'content' 0.00710.0056 769.992298.0859
Module end 'content' 0.01270.1917 868.0781526.6719
Script end 0.2045  1,394.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.7483200.0002
Check MTime0.00140.6849200.0001
Mysql Total
Database connection0.00080.387710.0008
Mysqli_queries0.159177.77371410.0011
Looping result0.00130.63791390.0000
Template Total0.191293.510.1912
Template load0.00070.360810.0007
Template processing0.190493.115410.1904
Override
Cache load0.00050.245410.0005
Sytem overhead
Fetch class attribute can translate value0.00070.359910.0007
XML
Image XML parsing0.00020.105610.0002
General
dbfile0.00351.7057200.0002
String conversion0.00000.002830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs