AuthDemo asks for auth (#595)
This commit is contained in:
parent
ca16584d8b
commit
a16d452a62
|
@ -6,8 +6,8 @@ use Mouse;
|
|||
our $VERSION = '2.0.0';
|
||||
|
||||
extends(
|
||||
'Lemonldap::NG::Portal::Main::Init',
|
||||
'Lemonldap::NG::Portal::Main::Run',
|
||||
'Lemonldap::NG::Portal::Main::Init',
|
||||
);
|
||||
|
||||
1;
|
||||
|
|
|
@ -24,22 +24,22 @@ sub enabledPlugins {
|
|||
|
||||
# Check if captcha is required
|
||||
# TODO: verify if this list is OK
|
||||
foreach my $key (
|
||||
qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled))
|
||||
{
|
||||
if ( $self->conf->{$key} ) {
|
||||
$self->lmLog( 'Captcha enabled', 'debug' );
|
||||
push @res, '::Plugins::Captcha';
|
||||
last;
|
||||
}
|
||||
}
|
||||
#foreach my $key (
|
||||
# qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled))
|
||||
#{
|
||||
# if ( $self->conf->{$key} ) {
|
||||
# $self->lmLog( 'Captcha enabled', 'debug' );
|
||||
# push @res, '::Plugins::Captcha';
|
||||
# last;
|
||||
# }
|
||||
#}
|
||||
|
||||
# Check if SOAP is enabled
|
||||
# TODO: REST
|
||||
push @res, 'SOAP' if ( $self->conf->{Soap} );
|
||||
|
||||
# Check if notification is enabled
|
||||
push @res, '::Plugins::Notifications' if ( $self->conf->{notification} );
|
||||
push @res, '::Plugins::Notifications' if ( $self->conf->{notifications} );
|
||||
foreach my $type (qw(password register)) {
|
||||
my $tmp = $self->conf->{$type};
|
||||
if ( $tmp and $tmp ne 'Null' ) {
|
||||
|
@ -60,6 +60,7 @@ sub enabledPlugins {
|
|||
$self->lmLog( 'Custom plugins: ' . $self->conf->{plugins}, 'debug' );
|
||||
push @res, grep ( /\w/, split( /,\s*/, $self->conf->{plugins} ) );
|
||||
}
|
||||
return @res;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -44,7 +44,7 @@ sub restoreArgs {
|
|||
# Verify url parameter
|
||||
sub controlUrl {
|
||||
my ( $self, $req ) = @_;
|
||||
$req->datas->{_url} ||= '';
|
||||
$req->{datas}->{_url} ||= '';
|
||||
if ( my $url = $req->param('url') ) {
|
||||
|
||||
# REJECT NON BASE64 URL
|
||||
|
|
|
@ -16,6 +16,8 @@ use Lemonldap::NG::Portal::Main::Request;
|
|||
|
||||
extends 'Lemonldap::NG::Portal::Main::Process';
|
||||
|
||||
use constant HANDLER => 'Lemonldap::NG::Handler::PSGI::API';
|
||||
|
||||
our $VERSION = '2.0.0';
|
||||
|
||||
# List constants
|
||||
|
@ -34,14 +36,14 @@ sub sessionDatas {
|
|||
# Lemonldap::NG::Portal::Main::Request
|
||||
# - launch Lemonldap::NG::Common::PSGI::Request::handler()
|
||||
sub handler {
|
||||
my ( $self, $req ) = shift;
|
||||
my ( $self, $req ) = @_;
|
||||
unless ($self->conf->{cfgNum}
|
||||
and $self->conf->{cfgNum} eq HANDLER->lmConf->{cfgNum} )
|
||||
{
|
||||
$self->reloadConf();
|
||||
}
|
||||
bless $req, 'Lemonldap::NG::Portal::Main::Request';
|
||||
return $self->SUPER::handler($req);
|
||||
return $self->Lemonldap::NG::Common::PSGI::Router::handler($req);
|
||||
}
|
||||
|
||||
# MAIN ENTRY POINTS (declared in Lemonldap::NG::Portal::Main::Init)
|
||||
|
|
Loading…
Reference in New Issue
Block a user