« blib/lib/Lemonldap/NG/Portal/Lib/OverConf.pm
↑ Summary
blib/lib/Lemonldap/NG/Portal/Auth/_Ajax.pm »
| 1 | package Lemonldap::NG::Portal::Auth::DBI; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 18 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 18 | ▶ | use Mouse; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 18 | ▶ | use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_BADCREDENTIALS); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 18 | our $VERSION = '2.0.12'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 18 | extends 'Lemonldap::NG::Portal::Auth::_WebForm', | |||||||||||||||||||
| 10 | 'Lemonldap::NG::Portal::Lib::DBI'; | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | # INTIALIZATION | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 151 | ▶ | sub init { | ||||||||||||||||||
|
Subroutine
init: called CC=4 SCAR=15.2
Pod
undocumented
| |||||||||||||||||||||
| 15 | 151 | my ($self) = @_; | |||||||||||||||||||
| 16 | 151 | foreach (qw(dbiAuthTable dbiAuthLoginCol dbiAuthPasswordCol)) { | |||||||||||||||||||
| 17 | $self->logger->warn( ref($self) . " seems not configured: missing $_" ) | ||||||||||||||||||||
| 18 | 453 | ▶ | unless $self->conf->{$_}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 19 | } | ||||||||||||||||||||
| 20 | 151 | ▶ | return ( $self->Lemonldap::NG::Portal::Auth::_WebForm::init | ||||||||||||||||||
|
Condition33%1/3
$self->Lemonldap::NG::Portal::Auth::_WebForm::init && $self->Lemonldap::NG::Portal::Lib::DBI::init
MC/DC0%0/2
$self->Lemonldap::NG::Portal::Auth::_WebForm::init && $self->Lemonldap::NG::Portal::Lib::DBI::init
$self->Lemonldap::NG::Portal::Auth::_WebForm::init
$self->Lemonldap::NG::Portal::Lib::DBI::init
Truth table33%1/3
A && B
A= $self->Lemonldap::NG::Portal::Auth::_WebForm::initB= $self->Lemonldap::NG::Portal::Lib::DBI::init
| |||||||||||||||||||||
| 21 | and $self->Lemonldap::NG::Portal::Lib::DBI::init ); | ||||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | has authnLevel => ( | ||||||||||||||||||||
| 25 | is => 'rw', | ||||||||||||||||||||
| 26 | lazy => 1, | ||||||||||||||||||||
| 27 | 17 | ▶ | default => sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 28 | 17 | $_[0]->conf->{dbiAuthnLevel}; | |||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | 18 | ); | |||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | # RUNNING METHODS | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 25 | ▶ | sub authenticate { | ||||||||||||||||||
|
Subroutine
authenticate: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 35 | 25 | my ( $self, $req ) = @_; | |||||||||||||||||||
| 36 | 25 | ▶ | if ( $self->check_password($req) ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 37 | 23 | return PE_OK; | |||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | else { | ||||||||||||||||||||
| 40 | 2 | $self->setSecurity($req); | |||||||||||||||||||
| 41 | 2 | return PE_BADCREDENTIALS; | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 16 | ▶ | sub authLogout { | ||||||||||||||||||
|
Subroutine
authLogout: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 46 | 16 | return PE_OK; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 18 | 1; | |||||||||||||||||||