Java 中的简单 OpenID
我是 OpenID 新手。是否可以在 Java 中针对 OpenID 执行类似的操作?
String username = "user";
String password = "pass";
OpenID openID = new OpenID(username, password);
然后我检索一些东西......回调,事件......类似的东西
void opedIDAuthenticatedSuccessfully(OpenIDEvent event) {
String id = event.getID;
String user = event.username;
...
}
它会很可爱!
I'm new into OpenID. Is it possible to do something like this in Java against OpenID?
String username = "user";
String password = "pass";
OpenID openID = new OpenID(username, password);
And then I retrieve something... callback, event... something like
void opedIDAuthenticatedSuccessfully(OpenIDEvent event) {
String id = event.getID;
String user = event.username;
...
}
It would be lovely!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一个适用于 Java 的 OpenID 库:http://code.google.com/p/openid4java
There is an OpenID library for Java: http://code.google.com/p/openid4java
OpenID 背后的整个想法是,绝不允许依赖应用程序(要求身份验证的应用程序)处理用户的实际身份验证凭据,这使用户的凭据更加安全,并减少应用程序的担心。
所以,不,没有办法用 OpenID 来完成您正在寻找的事情,因为您所要求的与 OpenID 的工作方式完全相反。
The entire idea behind OpenID is that the relying application (the one asking for authentication) never is allowed to handle the user's actual authentication credentials, which keeps the user's credentials more secure and gives the application less to worry about.
So, no, there isn't a way to do what you are looking for with OpenID because what you are asking for ex exactly the opposite of how OpenID works.
OpenID 属性交换是一种 OpenID 服务扩展,用于在端点之间交换身份信息。提供用于检索和存储身份信息的消息。更多信息请参见 doc
OpenID Connect 1.0 作为身份验证解决方案进行销售。 身份验证和授权之间的区别
OpenID 是关于验证一个人的身份身份。如果您不知道 OAUTH、OpenID 和 OPENID 之间的区别,请参阅 很好的解释
使用 java 的库请参见 openid-specs
OpenID Attribute Exchange is an OpenID service extension for exchanging identity information between endpoints. Messages for retrieval and storage of identity information are provided. More see in doc
OpenID Connect 1.0 is marketed as an Authentication solution. Difference between Authentication and Authorization
OpenID is about verifying a person's identity. If you don't know difference between OAUTH, OpenID and OPENID see good explanation
Libraries for work with java see in openid-specs