2016-05-26 23:26:49 +02:00
|
|
|
package Lemonldap::NG::Portal::Auth::Remote;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use Mouse;
|
|
|
|
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK);
|
|
|
|
|
2019-02-12 18:21:38 +01:00
|
|
|
our $VERSION = '2.1.0';
|
2016-05-26 23:26:49 +02:00
|
|
|
|
2018-02-19 22:11:43 +01:00
|
|
|
extends 'Lemonldap::NG::Portal::Main::Auth',
|
2016-05-26 23:26:49 +02:00
|
|
|
'Lemonldap::NG::Portal::Lib::Remote';
|
|
|
|
|
2016-06-09 20:40:20 +02:00
|
|
|
# RUNNING METHODS
|
|
|
|
|
2016-05-26 23:26:49 +02:00
|
|
|
sub extractFormInfo {
|
|
|
|
my ( $self, $req ) = @_;
|
2016-07-18 21:42:53 +02:00
|
|
|
my $r = $self->checkRemoteId($req);
|
2016-05-26 23:26:49 +02:00
|
|
|
return $r unless ( $r == PE_OK );
|
|
|
|
$req->{user} =
|
2018-07-05 22:56:16 +02:00
|
|
|
$req->data->{rSessionInfo}->{ $self->conf->{remoteUserField} || 'uid' };
|
|
|
|
$req->data->{password} = $req->data->{rSessionInfo}->{'_password'};
|
2016-05-26 23:26:49 +02:00
|
|
|
PE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub authenticate {
|
|
|
|
PE_OK;
|
|
|
|
}
|
|
|
|
|
2016-12-01 23:25:05 +01:00
|
|
|
sub setAuthSessionInfo {
|
|
|
|
my ( $self, $req ) = @_;
|
|
|
|
|
|
|
|
# Store password (deleted in checkRemoteId() if local policy does not accept
|
|
|
|
# stored passwords)
|
2018-07-05 22:56:16 +02:00
|
|
|
$req->{sessionInfo}->{'_password'} = $req->data->{'password'};
|
2016-12-02 06:47:38 +01:00
|
|
|
$req->{sessionInfo}->{authenticationLevel} =
|
2018-07-05 22:56:16 +02:00
|
|
|
$req->data->{rSessionInfo}->{authenticationLevel};
|
2016-12-01 23:25:05 +01:00
|
|
|
PE_OK;
|
|
|
|
}
|
|
|
|
|
2016-05-26 23:26:49 +02:00
|
|
|
sub authLogout {
|
|
|
|
PE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub getDisplayType {
|
|
|
|
return "logo";
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|