Slave in progress
This commit is contained in:
parent
7c2cc91098
commit
3d5709cd0a
@ -575,9 +575,10 @@ sub struct {
|
||||
|
||||
# Slave
|
||||
slaveParams => {
|
||||
_nodes => [qw(slaveAuthnLevel)],
|
||||
_nodes => [qw(slaveAuthnLevel slaveUserAttr)],
|
||||
_help => 'authSlave',
|
||||
slaveAuthnLevel => 'int:/slaveAuthnLevel',
|
||||
slaveUserAttr => 'int:/slaveUserAttr',
|
||||
},
|
||||
|
||||
# Choice
|
||||
@ -1655,6 +1656,10 @@ sub testStruct {
|
||||
|
||||
# Slave
|
||||
slaveAuthnLevel => $integer,
|
||||
slaveUserAttr => {
|
||||
test => qr/^[_a-zA-Z]\w*$/,
|
||||
msgFail => 'Bad attribute name',
|
||||
},
|
||||
|
||||
# Choice
|
||||
authChoiceParams => $testNotDefined,
|
||||
|
@ -257,6 +257,8 @@ sub en {
|
||||
singleIP => 'One IP only by user',
|
||||
singleSession => 'One session only by user',
|
||||
singleUserByIP => 'One user by IP address',
|
||||
slaveAuthnLevel => 'Authentication level',
|
||||
slaveParams => 'Slave parameters',
|
||||
SMTPServer => 'SMTP server',
|
||||
soap => 'SOAP',
|
||||
Soap => 'Activation',
|
||||
@ -641,6 +643,8 @@ sub fr {
|
||||
singleIP => 'Une seule IP par utilisateur',
|
||||
singleSession => 'Une seule session par utilisateur',
|
||||
singleUserByIP => 'Une seule adresse IP par utilisateur',
|
||||
slaveAuthnLevel => 'Niveau d\'authentification',
|
||||
slaveParams => 'Paramètres Slave',
|
||||
SMTPServer => 'Serveur SMTP',
|
||||
soap => 'SOAP',
|
||||
Soap => 'Activation',
|
||||
|
@ -18,7 +18,6 @@ our @ISA = qw(Lemonldap::NG::Portal::AuthNull);
|
||||
sub setAuthSessionInfo {
|
||||
my $self = shift;
|
||||
|
||||
$self->{sessionInfo}->{'_user'} = 'anonymous';
|
||||
$self->{sessionInfo}->{authenticationLevel} = $self->{slaveAuthnLevel};
|
||||
|
||||
PE_OK;
|
||||
|
@ -23,6 +23,8 @@ sub setSessionInfo {
|
||||
$v =~ s/\-/_/g;
|
||||
$self->{sessionInfo}->{$k} = $ENV{$v} and $c++;
|
||||
}
|
||||
$self->{sessionInfo}->{'_user'} ||=
|
||||
$self->{sessionInfo}->{ $self->{slaveUserAttr} };
|
||||
return ( $c ? PE_OK : PE_USERNOTFOUND );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user