开发者

Identity table design for OpenId/Facebook

I plan to make a table to hold the Openid or Facebook identities of users. Users have one-to-many mapping to the Identity table

Identity table

identity_id  user_id    type      type_id
1            1          facebook  123456789
2            1          google    456789798
3            2          yahoo     123456789
4            2          aol       231634654
5            1          openid    123456789
6         开发者_如何学Python   2          openid    878919819

type_id is not necessarily composed of numbers only(its just for example here). Also I am still not sure if Google, Yahoo,etc will be under OpenId. If that is the case then maybe I can define 2 types only, Facebook and OpenId. The reason they are separate is that Facebook doesn't have an OpenId implementation yet.

Is this table enough for storing identities or are there some factors that I haven't taken into account?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜