Commit 5dd981fa authored by Clément OUDOT's avatar Clément OUDOT
Browse files

SAML: load Lasso method

parent 3744ce59
......@@ -7,6 +7,7 @@ package Lemonldap::NG::Portal::AuthSAML;
use strict;
use Lemonldap::NG::Portal::Simple;
use Lemonldap::NG::Portal::_SAML; #inherits
our $VERSION = '0.1';
......@@ -16,8 +17,15 @@ our $VERSION = '0.1';
# @return Lemonldap::NG::Portal error code
sub authInit {
my $self = shift;
$self->lmLog( 'This module is not yet usable', 'error' );
PE_ERROR;
# Load Lasso
return PE_ERROR unless $self->loadLasso();
# Load service metadata
# Load entities metadata
PE_OK;
}
## @apmethod int extractFormInfo()
......
......@@ -6,9 +6,31 @@
package Lemonldap::NG::Portal::_SAML;
use strict;
use base qw(Exporter);
our @EXPORT = qw(loadLasso);
our $VERSION = '0.01';
## @method boolean loadLasso()
# Load Lasso module
# @return boolean result
sub loadLasso {
my $self = shift;
eval { require Lasso; };
if ($@) {
$self->lmLog( "Module Lasso not found in @INC", 'error' );
$self->lmLog( "$@", 'debug' );
return 0;
}
my $version = $Lasso::VERSION;
$self->lmLog( "Module Lasso $version loaded", 'debug' );
return 1;
}
1;
__END__
......@@ -16,28 +38,35 @@ __END__
=encoding utf8
Lemonldap::NG::Portal::_SAML - TODO
Lemonldap::NG::Portal::_SAML
=head1 SYNOPSIS
use Lemonldap::NG::Portal::_SAML;
#TODO
use Lemonldap::NG::Portal::_SAML;
=head1 DESCRIPTION
TODO
This module contains common methods for SAML authentication
and user information loading
=head1 METHODS
=head2 loadLasso
Load Lasso module
=head1 SEE ALSO
L<Lemonldap::NG::Portal>
L<Lemonldap::NG::Portal::AuthSAML>, L<Lemonldap::NG::Portal::UserDBSAML>
=head1 AUTHOR
Xavier Guimard, E<lt>x.guimard@free.frE<gt>
Xavier Guimard, E<lt>x.guimard@free.frE<gt>,
Clement Oudot, E<lt>coudot@linagora.comE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2009 by Xavier Guimard
Copyright (C) 2009 by Xavier Guimard, Clement Oudot
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment