| 1 | 4 | ▶ | use strictures 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Mojito::Auth; | ||
| 3 | 4 | $Mojito::Auth::VERSION = '0.25'; | |
| 4 | 4 | ▶ | use Mojito::Auth::Mongo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use Mojito::Auth::Deep; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 4 | ▶ | use Mojito::Auth::Elasticsearch; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 4 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | =head1 Name | ||
| 10 | |||
| 11 | Mojito::Auth - authentication delegator class | ||
| 12 | |||
| 13 | =cut | ||
| 14 | |||
| 15 | 4 | has 'auth' => ( | |
| 16 | is => 'ro', | ||
| 17 | lazy => 1, | ||
| 18 | writer => '_set_auth', | ||
| 19 | handles => [ qw( digest_authen_cb _secret get_user add_user remove_user username realm password clear_db_name db_name) ], | ||
| 20 | ); | ||
| 21 | |||
| 22 | 0 | ▶ | sub BUILD { |
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 23 | 0 | my ($self, $constructor_args_href) = @_; | |
| 24 | |||
| 25 | # Determine the document store backend from the configuration | ||
| 26 | 0 | my $doc_storage = ucfirst lc $constructor_args_href->{config}->{document_storage}; | |
| 27 | 0 | my $delegatee = __PACKAGE__ . '::' . $doc_storage; | |
| 28 | 0 | $self->_set_auth($delegatee->new($constructor_args_href)); | |
| 29 | } | ||
| 30 | |||
| 31 | 4 | 1 | |