line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
13
|
use utf8; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
17
|
|
2
|
|
|
|
|
|
|
package Etcd3::Auth::UserRevokeRole; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
126
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
77
|
|
5
|
4
|
|
|
4
|
|
13
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
80
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
12
|
use Moo; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
20
|
|
8
|
4
|
|
|
4
|
|
701
|
use Types::Standard qw(Str Int Bool HashRef ArrayRef); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
17
|
|
9
|
4
|
|
|
4
|
|
2047
|
use MIME::Base64; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
155
|
|
10
|
4
|
|
|
4
|
|
15
|
use JSON; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
14
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Etcd3::Role::Actions'; |
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
4
|
|
334
|
use namespace::clean; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
16
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Etcd3:::Auth::UserRevokeRole |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = '0.005'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
revokes a role of specified user. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 endpoint |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
/auth/user/revoke |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has endpoint => ( |
35
|
|
|
|
|
|
|
is => 'ro', |
36
|
|
|
|
|
|
|
isa => Str, |
37
|
|
|
|
|
|
|
default => '/auth/user/revoke' |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 name |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
name of user |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has name => ( |
47
|
|
|
|
|
|
|
is => 'ro', |
48
|
|
|
|
|
|
|
isa => Str, |
49
|
|
|
|
|
|
|
required => 1, |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 role |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
name of role |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
has role => ( |
60
|
|
|
|
|
|
|
is => 'ro', |
61
|
|
|
|
|
|
|
isa => Str, |
62
|
|
|
|
|
|
|
required => 1, |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 json_args |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
arguments that will be sent to the api |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=cut |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
has json_args => ( |
73
|
|
|
|
|
|
|
is => 'lazy', |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub _build_json_args { |
77
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
78
|
0
|
|
|
|
|
|
my $args; |
79
|
0
|
|
|
|
|
|
for my $key ( keys %{ $self }) { |
|
0
|
|
|
|
|
|
|
80
|
0
|
0
|
|
|
|
|
unless ( $key =~ /(?:_client|json_args|endpoint)$/ ) { |
81
|
0
|
|
|
|
|
|
$args->{$key} = $self->{$key}; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
} |
84
|
0
|
|
|
|
|
|
return to_json($args); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 init |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub init { |
92
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
93
|
0
|
|
|
|
|
|
my $init = $self->json_args; |
94
|
0
|
0
|
|
|
|
|
$init or return; |
95
|
0
|
|
|
|
|
|
return $self; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |