|
24 | 24 | import org.mitre.oauth2.model.ClientDetailsEntity.AuthMethod;
|
25 | 25 | import org.mitre.oauth2.service.ClientDetailsEntityService;
|
26 | 26 | import org.mitre.oauth2.web.AuthenticationUtilities;
|
27 |
| -import org.mitre.openid.connect.service.UserInfoService; |
28 | 27 | import org.mitre.openid.connect.view.ClientEntityViewForAdmins;
|
29 | 28 | import org.mitre.openid.connect.view.ClientEntityViewForUsers;
|
30 | 29 | import org.mitre.openid.connect.view.HttpCodeView;
|
@@ -75,9 +74,6 @@ public class ClientAPI {
|
75 | 74 | @Autowired
|
76 | 75 | private ClientDetailsEntityService clientService;
|
77 | 76 |
|
78 |
| -@Autowired |
79 |
| -private UserInfoService userInfoService; |
80 |
| - |
81 | 77 | private JsonParser parser = new JsonParser();
|
82 | 78 |
|
83 | 79 | private Gson gson = new GsonBuilder()
|
@@ -239,7 +235,7 @@ public String apiAddClient(@RequestBody String jsonString, Model m, Authenticati
|
239 | 235 | } catch (IllegalArgumentException e) {
|
240 | 236 | logger.error("Unable to save client: {}", e.getMessage());
|
241 | 237 | m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
|
242 |
| -m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Unable to save client"); |
| 238 | +m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Unable to save client: " + e.getMessage()); |
243 | 239 | return JsonErrorView.VIEWNAME;
|
244 | 240 | }
|
245 | 241 | }
|
@@ -340,7 +336,7 @@ public String apiUpdateClient(@PathVariable("id") Long id, @RequestBody String j
|
340 | 336 | } catch (IllegalArgumentException e) {
|
341 | 337 | logger.error("Unable to save client: {}", e.getMessage());
|
342 | 338 | m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
|
343 |
| -m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Unable to save client"); |
| 339 | +m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Unable to save client: " + e.getMessage()); |
344 | 340 | return JsonErrorView.VIEWNAME;
|
345 | 341 | }
|
346 | 342 | }
|
|
0 commit comments