TieUpYourCamel has asked for the wisdom of the Perl Monks concerning the following question:
And these are my settings in config.yml:package myApp; use Dancer2; use Dancer2::Plugin::Auth::ActiveDirectory; get '/loginForm' => sub { template 'loginForm' => { 'title' => 'loginForm' }; }; post '/loginPost' => sub { session 'user' => authenticate(params->{user}, params->{pass}) +; return template 'loggedIn' => {}; }; true;
The error message is:plugins: Auth::ActiveDirectory: host: xxx.xxx.xxx.xxx principal: 'OU=USER,OU=ACCOUNTS,OU=OUROU,DC=our,DC=domain,DC=com' domain: our.domain.com rights: definedright1: 'Our Users'
I've tried two different AD accounts, both of which are members of the "Our Users" group, and get the same error message. If I put in an invalid password I get a different error. As far as I can tell I am following all of the directions in the documentation, and I'm using the same AD settings that are currently working in the PHP webapp that I'm attempting to rewrite in Perl. Any insights will be greatly appreciated.Can't call method "groups" on unblessed reference at /home/camel/perl5 +/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/Dancer2/Plugin/Auth/ +ActiveDirectory.pm line 140. /home/camel/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/Danc +er2/Plugin/Auth/ActiveDirectory.pm around line 140 135 136 register authenticate => sub { 137 my ( $dsl, $name, $pass ) = @_; 138 my $user = _connect_to_ad($dsl)->authenticate( $name, $pass + ); 139 return $user if $user->{error}; 140 my $user_groups = [ map { $_->name } @{ $user->groups } ]; 141 return { 142 uid => $user->uid, 143 firstname => $user->firstname, 144 surname => $user->surname, 145 mail => $user->mail,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error with Dancer2::Plugin::Auth::ActiveDirectory
by 1nickt (Canon) on Jan 09, 2020 at 01:21 UTC | |
by TieUpYourCamel (Scribe) on Jan 17, 2020 at 18:12 UTC | |
by TieUpYourCamel (Scribe) on Jan 20, 2020 at 19:08 UTC |