lemonldap-ng/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Apache.pm

49 lines
728 B
Perl
Raw Normal View History

2016-05-22 13:27:37 +02:00
package Lemonldap::NG::Portal::Auth::Apache;
use strict;
use Mouse;
2016-05-22 14:22:59 +02:00
use Lemonldap::NG::Portal::Main::Constants qw(PE_ERROR PE_OK);
2016-05-22 13:27:37 +02:00
our $VERSION = '0.1';
extends 'Lemonldap::NG::Portal::Auth::Base';
2016-06-09 20:40:20 +02:00
# INITIALIZATION
2016-05-22 13:27:37 +02:00
sub init {
1;
}
2016-06-09 20:40:20 +02:00
# RUNNING METHODS
2016-05-22 13:27:37 +02:00
sub extractFormInfo {
my ( $self, $req ) = @_;
unless ( $req->{user} = $req->{REMOTE_USER} ) {
$self->lmLog( 'Apache is not configured to authenticate users!',
'error' );
return PE_ERROR;
}
# This is needed for Kerberos authentication
$req->{user} =~ s/^(.*)@.*$/$1/g;
PE_OK;
}
sub authenticate {
PE_OK;
}
sub authForce {
2016-05-24 22:50:22 +02:00
0;
2016-05-22 13:27:37 +02:00
}
sub authLogout {
PE_OK;
}
2016-05-23 23:52:32 +02:00
sub getDisplayType {
return 'logo';
}
2016-05-22 13:27:37 +02:00
1;