auth module may contains parameters
This commit is contained in:
parent
1c35cedc0a
commit
be083d33e3
|
@ -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};
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user