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