2017-03-07 18:28:09 +01:00
|
|
|
package Lemonldap::NG::Portal::Auth::Custom;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
2018-11-23 22:08:06 +01:00
|
|
|
# Fake 'new' method here. Return Lemonldap::NG::Portal::Auth::Custom::{CustomAuth}->new
|
2017-03-07 18:28:09 +01:00
|
|
|
sub new {
|
|
|
|
my ( $class, $self ) = @_;
|
|
|
|
unless ( $self->{conf}->{customAuth} ) {
|
2018-08-29 18:52:22 +02:00
|
|
|
die 'Custom Auth module not defined';
|
2017-03-07 18:28:09 +01:00
|
|
|
}
|
2018-08-29 18:52:22 +02:00
|
|
|
|
2018-11-29 21:12:43 +01:00
|
|
|
my $res;
|
|
|
|
eval { $res = $self->{p}->loadModule( $self->{conf}->{customAuth} ) };
|
|
|
|
die 'Unable to load Auth module ' . $self->{conf}->{customAuth} if ($@);
|
|
|
|
return $res;
|
2018-11-22 19:59:43 +01:00
|
|
|
}
|
|
|
|
|
2017-03-07 18:28:09 +01:00
|
|
|
1;
|