<commit_before>use strict;
# use warning;

# Custom modules
use lib "/exlibris/primo/p3_1/pds/custom/lib";
use lib "/exlibris/primo/p3_1/pds/custom/vendor/lib";
# PDS program modules
use lib "/exlibris/primo/p3_1/pds/program";

# NYU Libraries modules
use NYU::Libraries::Util qw(parse_conf);
use NYU::Libraries::PDS;

# PDS Core modules
use PDSUtil qw(getEnvironmentParams);
use PDSParamUtil;

sub custom_authenticate_ns_ldap {
  my ($session_id, $id, $password, $institute, $user_ip, $params) = @_;
  my $pds_directory = getEnvironmentParams('pds_directory');
  my $conf = parse_conf("$pds_directory/config/nyu.conf");
  my $calling_system = PDSParamUtil::getAndFilterParam('calling_system');
  my $target_url = PDSParamUtil::queryUrl();
  my $session_controller = NYU::Libraries::PDS::controller($conf, $institute, 
    $calling_system, $target_url, $session_id);
  $session_controller->authenticate_ns_ldap($id, $password);
}<commit_msg>Update authentication and glue :rainbow:<commit_after>use strict;
# use warning;

# Custom modules
use lib "/exlibris/primo/p3_1/pds/custom/lib";
use lib "/exlibris/primo/p3_1/pds/custom/vendor/lib";
# PDS program modules
use lib "/exlibris/primo/p3_1/pds/program";

# NYU Libraries modules
use NYU::Libraries::Util qw(parse_conf);
use NYU::Libraries::PDS;

# PDS Core modules
use PDSUtil qw(getEnvironmentParams);
use PDSParamUtil;

sub custom_authenticate_ns_ldap {
  my ($session_id, $id, $password, $institute, $user_ip, $params) = @_;
  my $pds_directory = getEnvironmentParams('pds_directory');
  my $conf = parse_conf("$pds_directory/config/nyu.conf");
  my $calling_system = PDSParamUtil::getAndFilterParam('calling_system');
  my $target_url = PDSParamUtil::queryUrl();
  my $session_controller = NYU::Libraries::PDS::controller($conf, $institute, 
    $calling_system, $target_url, $session_id);
  my $session = $session_controller->authenticate_ns_ldap($id, $password)
  return ($session_controller->error) ? 
    ("11", "<error/>", $session_controller->error) : ("00", $session->to_xml);
}
{'fraction_non_alphanumeric': 0.1474045053868756, 'fraction_numerical': 0.007835455435847209, 'mean_word_length': 6.511029411764706, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6324999', 'n_tokens_mistral': 757, 'n_tokens_neox': 744, 'n_words': 141}