line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Routes::Login; |
2
|
5
|
|
|
5
|
|
4049
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
150
|
|
3
|
5
|
|
|
5
|
|
19
|
use warnings; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
100
|
|
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
17
|
use Moo; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
21
|
|
6
|
|
|
|
|
|
|
with 'Articulate::Role::Routes'; |
7
|
5
|
|
|
5
|
|
1494
|
use Articulate::Syntax::Routes; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
25
|
|
8
|
5
|
|
|
5
|
|
3177
|
use Articulate::Service; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
18
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
post '/login' => sub { |
11
|
|
|
|
|
|
|
my ( $self, $request ) = @_; |
12
|
|
|
|
|
|
|
my $user_id = $request->params->{'user_id'}; |
13
|
|
|
|
|
|
|
my $password = $request->params->{'password'}; |
14
|
|
|
|
|
|
|
my $redirect = $request->params->{'redirect'} // '/'; |
15
|
|
|
|
|
|
|
$self->service->process_request( |
16
|
|
|
|
|
|
|
login => { |
17
|
|
|
|
|
|
|
user_id => $user_id, |
18
|
|
|
|
|
|
|
password => $password |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
post '/logout' => sub { |
24
|
|
|
|
|
|
|
my ( $self, $request ) = @_; |
25
|
|
|
|
|
|
|
my $redirect = $request->params->{'redirect'} // '/'; |
26
|
|
|
|
|
|
|
$self->service->process_request( logout => {} ); |
27
|
|
|
|
|
|
|
}; |