简体   繁体   English

使用Play Framework的OpenID

[英]OpenID using Play Framework

I am in the process of creating a website and I want users to be able to login with an openID account. 我正在创建一个网站,我希望用户能够使用openID帐户登录。 I am using java and the play framework. 我正在使用java和play框架。 They will need to be able to login to see certain parts of the website. 他们需要能够登录才能看到网站的某些部分。

I have read the information here: http://www.playframework.org/documentation/2.0/JavaOpenID 我在这里阅读了这些信息: http//www.playframework.org/documentation/2.0/JavaOpenID

And I have downloaded openid4java here: http://code.google.com/p/openid4java/downloads/detail?name=openid4java-0.9.6.662.tar.gz&can=2&q= 我在这里下载了openid4java: http//code.google.com/p/openid4java/downloads/detail? name = openn4java-0.9.6.662.tar.gz&can = 2&q =

Should I just import all of the .jars from this download as reference libraries in my project? 我是否应该将此下载中的所有.jars作为参考库导入到我的项目中?

I am not really too sure where to begin with configuring this as the documentation on plays website seems vague. 我不太确定从哪里开始配置这个,因为play网站上的文档看起来很模糊。

Any tips provided are greatly appreciated. 提供的任何提示都非常感谢。

使用http://securesocial.ws/插件更容易。

There is full authentication/authorization stack available as a module - Play! 有完整的身份验证/授权堆栈作为模块 - 玩! Authenticate 认证

It allows you to register users with many providers, also with OpenID or just an email. 它允许您向许多提供商注册用户,也可以使用OpenID或仅通过电子邮件注册。 Additionally there's support for multilanguage, template customization (also in emails) etc. Finally it's shipped originally with DeadBolt2 - authorization solution with roles and users permissions. 此外,还支持多语言,模板自定义(也可以在电子邮件中)等。最后,它最初是与DeadBolt2一起提供的 - 具有角色和用户权限的授权解决方案。

与任何其他依赖项一样,您应该将OpenID依赖项作为sbt依赖项管理的一部分添加到项目中,以便它们在运行时可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM