A number of smart people are working on a standard, and it's called OAuth. It already has a number of sample implementations, so it's pretty easy to get started.
A good way of generating a key would be to store a GUID (Globally Unique Identifier) on each user record n the database. GUID is going to be unique and almost impossible to guess.
发布评论
评论(5)
还有一些基础设施服务可以为您管理所有这些,例如 http://www.3scale.net (披露我工作那里),http://www.mashery.com 和 http://www.apigee.com/。
There are also infrastructure services that manage all this for you like http://www.3scale.net (disclosure I work there), http://www.mashery.com and http://www.apigee.com/.
许多聪明人正在制定一个标准,它被称为 OAuth。 它已经有许多示例实现,因此很容易上手。
A number of smart people are working on a standard, and it's called OAuth. It already has a number of sample implementations, so it's pretty easy to get started.
简单:
Simple:
目前,我使用多个 MD5 与盐的串联。 MD5 是根据用户数据的各种串联生成的。
Currently, I use a concatenation of multiple MD5s with a salt. The MD5s are generated off of various concatenations of user data.
生成密钥的一个好方法是在数据库中的每个用户记录上存储 GUID(全局唯一标识符)。 GUID 将是唯一的并且几乎不可能猜测。
A good way of generating a key would be to store a GUID (Globally Unique Identifier) on each user record n the database. GUID is going to be unique and almost impossible to guess.