| 1 | package Cassandra::Client::Policy::Auth::Password; | ||||||||||
| 2 | 13 | our $AUTHORITY = 'cpan:TVDW'; | |||||||||
| 3 | 13 | $Cassandra::Client::Policy::Auth::Password::VERSION = '0.21'; | |||||||||
| 4 | 13 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 13 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 13 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 0 | my ($class, %args)= @_; | |||||||||
| 10 | |||||||||||
| 11 | 0 | my $username= delete $args{username}; | |||||||||
| 12 | 0 | my $password= delete $args{password}; | |||||||||
| 13 | |||||||||||
| 14 | 0 | return bless { | |||||||||
| 15 | username => $username, | ||||||||||
| 16 | password => $password, | ||||||||||
| 17 | }, $class; | ||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub begin { | ||||||||
|
Subroutine
begin: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 21 | 0 | my ($self)= @_; | |||||||||
| 22 | 0 | return $self; # We are not a stateful implementation | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 0 | ▶ | sub evaluate { | ||||||||
|
Subroutine
evaluate: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 26 | 0 | my ($self, $callback, $challenge)= @_; | |||||||||
| 27 | 0 | my $user= $self->{username}; | |||||||||
| 28 | 0 | my $pass= $self->{password}; | |||||||||
| 29 | 0 | ▶ | utf8::encode($user) if utf8::is_utf8($user); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | ▶ | utf8::encode($pass) if utf8::is_utf8($pass); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 0 | return $callback->(undef, "\0$user\0$pass"); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | sub success { | ||||||||
|
Subroutine
success: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 35 | 0 | my ($self)= @_; | |||||||||
| 36 | # Ignored | ||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 13 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||