我找到了这个项目https://code.google.com/p/idp4java这取决于openId4Java
但是我在运行时遇到了以下问题
HTTP Status 500 - org.openid4java.message.IndirectError cannot be cast to org.openid4java.message.AuthSuccess
type Exception report
message org.openid4java.message.IndirectError cannot be cast to org.openid4java.message.AuthSuccess
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.ClassCastException: org.openid4java.message.IndirectError cannot be cast to org.openid4java.message.AuthSuccess
net.vinant.idp4java.openid4javaImpl.OpenId4JavaProtocolImplementation.checkId(OpenId4JavaProtocolImplementation.java:245)
net.vinant.idp4java.openid4javaImpl.OpenId4JavaProtocolImplementation.handle(OpenId4JavaProtocolImplementation.java:105)
net.vinant.idp4java.EndpointServlet.doPost(EndpointServlet.java:43)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.52 logs.
我通过更改解决了问题
// messageResponse = manager.authResponse(parameterList, userSelectedId, userSelectedClaimedId, true);
messageResponse = manager.authResponse(parameterList, opLocalId, opLocalId, true);
到这个代码
messageResponse = manager.authResponse(parameterList, userSelectedId, userSelectedClaimedId, true);
// messageResponse = manager.authResponse(parameterList, opLocalId, opLocalId, true);