use of org.orcid.pojo.ajaxForm.OauthAuthorizeForm in project ORCID-Source by ORCID.
the class OauthGenericCallsController method getEmptyAuthorizeForm.
@RequestMapping(value = "/oauth/custom/authorize/empty.json", method = RequestMethod.GET)
@ResponseBody
public OauthAuthorizeForm getEmptyAuthorizeForm(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException {
OauthAuthorizeForm empty = new OauthAuthorizeForm();
Text emptyText = Text.valueOf(StringUtils.EMPTY);
empty.setPassword(emptyText);
empty.setUserName(emptyText);
RequestInfoForm requestInfoForm = getRequestInfoForm(request);
if (requestInfoForm != null) {
if (!PojoUtil.isEmpty(requestInfoForm.getUserId())) {
empty.setUserName(Text.valueOf(requestInfoForm.getUserId()));
}
}
return empty;
}
Aggregations