Updated redirect URI error message for coherence.
Change-Id: Ie942a39b282152ccb66c12e5cedb4eaa3ce73493
diff --git a/full/Changes b/full/Changes
index de3175a..aa7b5f2 100644
--- a/full/Changes
+++ b/full/Changes
@@ -10,7 +10,7 @@
- Handled redundant plugin installation
- Handled super client id in plugin installation
- Deprecated UserClientDto and uses ClientinfoDto instead
-
+ - Updated redirect URI error message for coherence
# version 0.67.1
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java
index 5898beb..6aa82d1 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java
@@ -39,7 +39,7 @@
@Autowired
private OAuth2ClientService clientService;
- /**e.description("Redirect URI is required");
+ /**
* Authorization code request does not require client
* authentication, but only checks if the client id exists.
*
@@ -131,7 +131,7 @@
e.responseStatus(HttpStatus.SC_TEMPORARY_REDIRECT);
}
else {
- e.description("Redirect URI is required");
+ e.description("Missing parameter: redirect URI");
}
}
@@ -181,7 +181,7 @@
}
else {
return new KustvaktException(StatusCodes.MISSING_REDIRECT_URI,
- "Redirect URI is required", OAuth2Error.INVALID_REQUEST);
+ "Missing parameter: redirect URI", OAuth2Error.INVALID_REQUEST);
}
}
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AuthorizationService.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AuthorizationService.java
index 581fa09..d2df86e 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AuthorizationService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AuthorizationService.java
@@ -129,7 +129,7 @@
}
else {
throw new KustvaktException(StatusCodes.MISSING_REDIRECT_URI,
- "Redirect URI is required",
+ "Missing parameter: redirect URI",
OAuth2Error.INVALID_REQUEST);
}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java
index 9e586e4..82caebe 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java
@@ -123,7 +123,7 @@
JsonNode node = JsonUtils.readTree(entity);
assertEquals(OAuthError.CodeResponse.INVALID_REQUEST,
node.at("/error").asText());
- assertEquals("Redirect URI is required",
+ assertEquals("Missing parameter: redirect URI",
node.at("/error_description").asText());
assertEquals(state, node.at("/state").asText());
}
@@ -252,7 +252,7 @@
node = JsonUtils.readTree(response.getEntity(String.class));
assertEquals(OAuthError.CodeResponse.INVALID_REQUEST,
node.at("/error").asText());
- assertEquals("Redirect URI is required",
+ assertEquals("Missing parameter: redirect URI",
node.at("/error_description").asText());
assertEquals(state, node.at("/state").asText());
}