验证在玩游戏!和RestEasy的 [英] Authentication in Play! and RestEasy

查看:161
本文介绍了验证在玩游戏!和RestEasy的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写在小程序中播放!,允许用户注册并添加哪些其他注册用户可以查看注册用户一些内容。我想一些REST API添加到我的应用程序与 [RestEasy的] 模块,以及我的问题是:是否有与其他进行认证的任何最佳做法或已知的解决方案让用户在播放使用RestEasy的管理自己的内容! ?

I have a small application written in Play! which allows user registration and adding some content for registered users which other registered users can view. I'd like to add some REST API to my application with [resteasy] module, and my question is: are there any best practices or known solutions for performing authentication with rest to allow users managing their own content using resteasy in Play! ?

我在想什么,现在左右,有两种解决方案:

What I'm thinking about now, are two solutions:


  1. 客户端发送数据,并送他的密码和用户名在某些哈希或EN codeD的形式,这数据与数据库中的凭据进行检查。如果有匹配,出现要求采取行动。

  2. 客户端首先进行认证,并返回的sessionId或他有添加到所有请求的东西(饼干吗?)。

任何帮助是AP preciated。

Any help is appreciated.

推荐答案

您必须对如何处理安全的这里这里

You have some related answers on how to approach security here and here.

我个人会尝试创造一些OAuth的认证2,如果API是由第三方使用。如果是私人使用(只有你的应用程序将调用它)等方法加上SSL应该足够了。

Personally I would try to create some OAuth 2 authentication if the API is to be used by 3rd parties. If it is private usage (only your apps will call it) other methods plus SSL should suffice.

这篇关于验证在玩游戏!和RestEasy的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆