Update OAuth2 management parameters to follow the new scheme of Kustvakt

Change-Id: I96da49571c941348f13d6cafa6784edb31f0cda3
diff --git a/t/server/mock.pl b/t/server/mock.pl
index 21b938f..43f4f5f 100644
--- a/t/server/mock.pl
+++ b/t/server/mock.pl
@@ -519,17 +519,31 @@
   my $c = shift;
   my $json = $c->req->json;
 
+  if ($json->{redirectURI}) {
+    return $c->render(
+      status => 400,
+      json => {
+        errors => [
+          [
+            201,
+            "Unrecognized field \"redirectURI\" (class de.ids_mannheim.korap.web.input.OAuth2ClientJson), not marked as ignorable (5 known properties: \"redirect_uri\", \"type\", \"name\", \"description\", \"url\"])\n at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 94] (through reference chain: de.ids_mannheim.korap.web.input.OAuth2ClientJson[\"redirectURI\"])"
+          ]
+        ]
+      }
+    );
+  };
+
   my $name = $json->{name};
   my $desc = $json->{description};
   my $type = $json->{type};
   my $url  = $json->{url};
-  my $redirect_url = $json->{redirectURI};
+  my $redirect_url = $json->{redirect_uri};
 
   my $list = $c->app->defaults('oauth.client_list');
 
   push @$list, {
-    "clientId" => $tokens{new_client_id},
-    "clientName" => $name,
+    "client_id" => $tokens{new_client_id},
+    "client_name" => $name,
     "description" => $desc,
     "url" => $url
   };
@@ -571,7 +585,7 @@
 
   my $break = -1;
   for (my $i = 0; $i < @$list; $i++) {
-    if ($list->[$i]->{clientId} eq $client_id) {
+    if ($list->[$i]->{client_id} eq $client_id) {
       $break = $i;
       last;
     };