NAME
Lemonldap::NG::Portal::AuthLA - Provide Liberty Alliance Authentication for FederID project.
SYNOPSIS
use Lemonldap::NG::Portal::AuthLA;my $portal = Lemonldap::NG::Portal::AuthLA->new({configStorage => {type => 'DBI',dbiChain => "dbi:mysql:...",dbiUser => "lemonldap",dbiPassword => "password",dbiTable => "lmConfig",} ,# Liberty ParameterslaSp => {certificate => '/path/to/public/key.pem' ,metadata => '/path/to/metadata.xml' ,privkey => '/path/to/private/key.pem' ,secretkey => '/path/to/private/key.pem' ,} ,laIdpsFile => '/path/to/idps/file.xml' ,laStorage => 'Apache::Session::File',laStorageOptions => {Directory => '/path/to/session/directory' ,LockDirectory => '/path/to/lockedsession/directory' ,} ,laDebug => 1 ,laLdapLoginAttribute => 'uid' ,# Parameters that permit to access lemonldap::NG::Handler local cachelocalStorage => 'Cache::FileCache' ,localStorageOptions => {} ,});if( $portal->process() ) {# Print protected URLsprint $portal->header ;print "<a href=\"http://$_\"> $_</a><br/>"foreach ($portal->getProtectedSites) ;} else {print $portal->header ;print '...' ;# Print simple templateprint 'Simple Authentication<br/>' ;print '<input type="hidden" name="url" value="' . $portal->param('url') . '"/>' ;print 'Login :' ;if ($portal->param('user')) {print '<input type="hidden" name="user" value="' . $portal->param('user') . '"/>' ;} else {print '<input type="hidden" name="user"/>' ;}print 'Password : <input name="password" type="password" autocomplete="off">' ;# Retrieve IDP list.my @idps = () ;foreach ($portal->getIdpIDs) {my %row_data ;$row_data{IDPNAME} = $_ ;push (@idps, \%row_data) ;}@idps = sort {$a cmp $b} @idps ;# Print SSO templateprint 'SSO Authentication<br/>' ;print '<select name="idpChoice"><option value="null">Select IDP</option>' ;foreach (@idps) {print '<option value="' . $_ . '">' . $_ . '</option>' ;}print '<input type="submit" value="ok" />' ;print '</form>' ;}
DESCRIPTION
Lemonldap::NG::Portal::AuthLA is the base module for building Lemonldap::NG compatible portals using a authentication mechanism based on Liberty Alliance. You have to use by inheritance.
SEE ALSO
Lemonldap::NG::Portal::SharedConf, Lemonldap::NG::Portal, Lemonldap::NG::Handler, Lemonldap::NG::Manager, http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation
AUTHOR
Clement Oudot, <[email protected]> Mikael Ates, <[email protected]> Thomas Chemineau, <[email protected]>
BUG REPORT
Use OW2 system to report bug or ask for features: <http://forge.objectweb.org/tracker/?group_id=274>
DOWNLOAD
Lemonldap::NG is available at <http://forge.objectweb.org/project/showfiles.php?group_id=274>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by FederID Consortium, <mail@FederID>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.