auth module may contains parameters

This commit is contained in:
Xavier Guimard 2013-10-05 15:59:18 +00:00
parent 1c35cedc0a
commit be083d33e3
4 changed files with 6 additions and 8 deletions

View File

@ -16,7 +16,7 @@ our $VERSION = '1.3.0';
sub userDBInit {
my $self = shift;
if ( $self->get_module('auth') eq 'Demo' ) {
if ( $self->get_module('auth') =~ /^Demo/ ) {
# Call authInit if demo accounts not found
$self->authInit() unless defined $self->{_demoAccounts};

View File

@ -17,15 +17,14 @@ our $VERSION = '1.3.0';
sub userDBInit {
my $self = shift;
if ( $self->get_module('auth') eq 'Google' ) {
}
else {
unless ( $self->get_module('auth') =~ /^Google/ ) {
$self->lmLog(
'UserDBGoogle isn\'t useable unless authentication module is set to Google',
'error'
);
return PE_ERROR;
}
PE_OK;
}
## @apmethod int getUser()

View File

@ -17,15 +17,14 @@ our $VERSION = '1.0.0';
sub userDBInit {
my $self = shift;
if ( $self->get_module('auth') eq 'OpenID' ) {
}
else {
unless ( $self->get_module('auth') =~ /^OpenID/ ) {
$self->lmLog(
'UserDBOpenID isn\'t useable unless authentication module is set to OpenID',
'error'
);
return PE_ERROR;
}
PE_OK;
}
## @apmethod int getUser()

View File

@ -18,7 +18,7 @@ our $VERSION = '1.0.0';
# @return Lemonldap::NG::Portal error code
sub userDBInit {
my $self = shift;
if ( $self->get_module('auth') eq 'SAML' ) {
if ( $self->get_module('auth') =~ /^SAML/ ) {
return PE_OK;
}
else {