lemonldap-ng/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Custom.pm
2021-12-19 18:19:22 +01:00

19 lines
474 B
Perl

package Lemonldap::NG::Portal::Auth::Custom;
use strict;
# Fake 'new' method here. Return Lemonldap::NG::Portal::Auth::Custom::{CustomAuth}->new
sub new {
my ( $class, $self ) = @_;
unless ( $self->{conf}->{customAuth} ) {
die 'Custom Auth module not defined';
}
my $res;
eval { $res = $self->{p}->loadModule( $self->{conf}->{customAuth} ) };
die 'Unable to load Auth module ' . $self->{conf}->{customAuth} if ($@);
return $res;
}
1;