|
|
|
@ -38,6 +38,11 @@ sub hAttr { |
|
|
|
|
. $_[0]->{conf}->{hiddenAttributes}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub persistentAttrs { |
|
|
|
|
$_[0]->{conf}->{persistentSessionAttributes} |
|
|
|
|
|| '_loginHistory _2fDevices notification_'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub init { |
|
|
|
|
my ($self) = @_; |
|
|
|
|
my $hd = $self->p->HANDLER; |
|
|
|
@ -72,6 +77,9 @@ sub display { |
|
|
|
|
if ( $self->conf->{impersonationRule} ); |
|
|
|
|
$attrs = $req->userData; |
|
|
|
|
|
|
|
|
|
$attrs = $self->_removePersistentAttributes($attrs) |
|
|
|
|
unless $self->conf->{checkUserDisplayPersistentInfo}; |
|
|
|
|
|
|
|
|
|
# Create an array of hashes for template loop |
|
|
|
|
$self->logger->debug("Delete hidden or empty attributes"); |
|
|
|
|
if ( $self->conf->{checkUserDisplayEmptyValues} ) { |
|
|
|
@ -239,7 +247,10 @@ sub check { |
|
|
|
|
$attrs = {}; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
$msg = 'checkUser' . $self->merged; |
|
|
|
|
$msg = 'checkUser' . $self->merged; |
|
|
|
|
$attrs = $self->_removePersistentAttributes($attrs) |
|
|
|
|
unless $self->conf->{checkUserDisplayPersistentInfo}; |
|
|
|
|
|
|
|
|
|
if ($compute) { |
|
|
|
|
$msg = 'checkUserComputeSession'; |
|
|
|
|
$attrs->{authenticationLevel} = $authLevel; |
|
|
|
@ -478,4 +489,15 @@ sub _splitAttributes { |
|
|
|
|
return [ $grps, $mcrs, $others ]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub _removePersistentAttributes { |
|
|
|
|
my ( $self, $attrs ) = @_; |
|
|
|
|
my $regex = join '|', split /\s+/, $self->persistentAttrs; |
|
|
|
|
my %attributes = %$attrs; |
|
|
|
|
my @keys = grep /$regex/, keys %attributes; |
|
|
|
|
$self->logger->debug("Remove persistent session attributes"); |
|
|
|
|
delete @attributes{@keys}; |
|
|
|
|
|
|
|
|
|
return \%attributes; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
1; |
|
|
|
|