use of org.openid4java.message.VerifyResponse in project cas by apereo.
the class OpenIdValidateController method handleRequestInternal.
@Override
public ModelAndView handleRequestInternal(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
final String openIdMode = request.getParameter(OpenIdProtocolConstants.OPENID_MODE);
if (StringUtils.equals(openIdMode, OpenIdProtocolConstants.CHECK_AUTHENTICATION)) {
final VerifyResponse message = (VerifyResponse) this.serverManager.verify(new ParameterList(request.getParameterMap()));
final Map<String, String> parameters = new HashMap<>();
parameters.putAll(message.getParameterMap());
if (message.isSignatureVerified()) {
LOGGER.debug("Signature verification request successful.");
return new ModelAndView(getSuccessView(), parameters);
}
LOGGER.debug("Signature verification request unsuccessful.");
return new ModelAndView(getFailureView(), parameters);
}
// since we only deal OpenId signature verification
return super.handleRequestInternal(request, response);
}
Aggregations