Update client list API according to API change
Change-Id: Ia2c04e0fc1cc98706145c04896794eed2195007a
diff --git a/lib/Kalamar/Plugin/Auth.pm b/lib/Kalamar/Plugin/Auth.pm
index d4e9e98..e77a672 100644
--- a/lib/Kalamar/Plugin/Auth.pm
+++ b/lib/Kalamar/Plugin/Auth.pm
@@ -356,8 +356,8 @@
# Get the list of all clients
return $c->korap_request(post => $r_url, {} => form => {
- client_id => $client_id,
- client_secret => $client_secret,
+ super_client_id => $client_id,
+ super_client_secret => $client_secret,
authorized_only => 'no'
})->then(
sub {
diff --git a/t/server/mock.pl b/t/server/mock.pl
index 6c9318f..bd6debe 100644
--- a/t/server/mock.pl
+++ b/t/server/mock.pl
@@ -567,6 +567,18 @@
post '/v1.0/oauth2/client/list' => sub {
my $c = shift;
+ my $v = $c->validation;
+
+ $v->required('super_client_id');
+ $v->required('super_client_secret');
+
+ if ($v->has_error) {
+ return $c->render(
+ json => [],
+ status => 400
+ );
+ };
+
# $c->param('client_secret');
# Is empty [] when nothing registered