Fixed clientId encoding in OAuth2ClientControllerTest.
Change-Id: I37664d909cc610a7433edd96755aba05e9e6dc8b
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 cff1ce2..7ce105f 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
@@ -73,7 +73,7 @@
String scope, code;
try {
checkResponseType(authzRequest.getResponseType());
- code = URLEncoder.encode(codeGenerator.createRandomCode(), "UTF-8");
+ code = codeGenerator.createRandomCode();
scope = createAuthorization(username, authzRequest.getClientId(),
redirectUriStr, authzRequest.getScopes(), code,
authenticationTime, null);
@@ -82,12 +82,6 @@
e.setRedirectUri(redirectURI);
throw e;
}
- catch (UnsupportedEncodingException e) {
- KustvaktException ke = new KustvaktException(
- StatusCodes.GENERAL_ERROR, e.getMessage());
- ke.setRedirectUri(redirectURI);
- throw ke;
- }
OAuthResponse oAuthResponse;
try {