Java Web 应用程序中使用用户令牌和会话管理进行用户身份验证管理
我在rails中使用devise和authlogic,它们提供所有用户管理功能,包括电子邮件发送、会话管理、令牌生成,
java中是否有任何现成的API可以提供所有用户登录管理功能?
请提出任何想法
i am using devise and authlogic in rails that provide all user management functionality with email sending , session management ,token generation
is there any ready api available in java that provides all user login management functionality ?
please suggests any idea
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定我是否正确地回答了你的问题..
对于用户登录功能..我假设你需要接受用户anme和密码..你必须设计的UI部分..可以处理密码加密等使用 MD5 或 SHA 或任何其他自定义实现。 (您可以参考 MessageDigest javadoc 或参考此处的示例实现 http://www.spiration.co.uk/post/1199/Java-md5-example-with-MessageDigest)邮件..可以使用java邮件或apache的邮件机制来处理。您可以查看 http://commons.apache.org/email/ 了解详细信息..注册会话管理,有几种方法..cookie或维护会话id等。如果你打算自己生成会话id..你可以使用java提供的UUID api。你可以参考一下。在这里 http://download.oracle.com /javase/1,5.0/docs/api/java/util/UUID.html .. 再次.. 如果这不是您要找的,我很抱歉:)
I am not sure I got your question correctly..
For a user login functionality.. i assume u would need to accept user anme and password.. The UI part you will have to design.. the password encryption etc can be taken care of using MD5 or SHA or any other custom implementation. (u can refer to MessageDigest javadoc or refer to a sample implementation here http://www.spiration.co.uk/post/1199/Java-md5-example-with-MessageDigest) Mailing.. can be taken care of using java mail or apache's mailing mechanism. you can look into http://commons.apache.org/email/ for details..Reg session management, there are several ways.. cookies or maintaining session id's etc. if u are planning to generate session id's on your own.. u can use UUID api's given by java. you can refer to it. over here http://download.oracle.com/javase/1,5.0/docs/api/java/util/UUID.html .. Again.. I am sorry if this is not what you are looking for :)