sdk - Android游戏接入第三方渠道账号登录的问题
ringa_lee
ringa_lee 2017-04-17 17:18:22
0
2
733
ringa_lee
ringa_lee

ringa_lee

reply all(2)
Peter_Zhu

The relationship between uid and token is like the relationship between "employees and access cards" in many companies. Employees enter the company and become employees of the company (uid). The company issues access cards (token) to employees. Employees must swipe the access card to enter the office. Now it’s easier to understand the security relationship issues implicit in this.

小葫芦

Don’t be confused by the so-called group of token. In fact, they don’t mean the same thing.
First of all, this token is generated by the agent. It is usually the checksum of a password account. This step has nothing to do with the game developer. It is an agreement between the agent and the player. The generated token is then sent to the game server as a password as a login basis. token迷惑了,实际上他们不是同一个意思。
首先这个token是由代理商生成的,一般就是个密码账号的校验和,这一步和游戏开发商毫无关系,是代理商和玩家之间的协定。然后生成的token作为密码发送给游戏服务器作为登陆依据。

打个比方:QQ游戏。
你通过QQ游戏客户端输入QQ账号和密码,其实账号密码并非直接发送到游戏服务器的,否则每个游戏数据库得有多大?而且腾讯也不放心把用户数据给游戏不是。因此,账号密码是发送给腾讯的服务器的,腾讯的服务器返回一个token和账号(注意啦,这是QQ号和QQ密码运算之后的结果),然后游戏客户端再把这个token和账号发送给游戏的服务端,这一过程才是登陆游戏。

而对于游戏服务器来说,判断用户的唯一标识就是账号和token,实际上,这里的token虽然和之前一样,但意义已经不同,就类似于密码一样。

换句话讲,你直接把账号和token发送给游戏服务器就可以登陆游戏了,之前的一步登陆只是为了获取用来登陆游戏服务器的token

For example: QQ game.
You enter your QQ account number and password through the QQ game client. In fact, the account password is not sent directly to the game server. Otherwise, how big must each game database be? And Tencent is not worried about giving user data to games. Therefore, the account password is sent to Tencent's server, and Tencent's server returns a token and account number (note that this is the result of the operation of QQ number and QQ password), and then the game client returns This token and account are sent to the game server. This process is the login to the game. 🎜 🎜For the game server, the only identification of the user is the account and token. In fact, although the token here is the same as before, the meaning is different, just like Same as password. 🎜 🎜In other words, you can log in to the game by sending your account number and token directly to the game server. The previous login step is just to obtain the token used to log in to the game server. That’s all. 🎜
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!