Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

sdk-server后台服务器,实现登录注册

License

NotificationsYou must be signed in to change notification settings

zhjzjnb/sdk-server

Repository files navigation

配合android_zsdk使用

实现客户端登录和注册,并且token验证,目前客户端不验证token也可以拿到用户的uid

后台admin管理,可以添加游戏,添加管理人员

数据存储采用mysql,token临时缓存在redis中

todo list

  • 是否强制验证token才返回用户uid
  • 支付宝和微信充值接入

登录成功token验证

使用http post方式发送json到服务器,数据结构如下

http://host/sdkserver/check.docontent-type:application/json{"sign":"String","token":"String","appId":"String"}返回也是json restful{"code":"int","msg":"String","data":"JsonObject"}

发送字段说明

字段类型来源
sign    String  见签名算法
token        String  登录成功返回的token
appId        String  游戏分配的appId
appKey        String  游戏分配的appKey,仅登录签名用,无需发送

返回字段说明

字段值 含义
code  0  成功
  -1  传递的json参数错误
  -2  玩家token不存在
  -3  appId对应的游戏不存在
msg  String  code对应的中文
data  JsonObject  code为0才有数据,{ "uid":"1234567"}

token验证算法

sign=md5(appId+appKey+token) 32位数小写上述符号+仅连接作用

作者zhj  

2018 年 01月 27日

About

sdk-server后台服务器,实现登录注册

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp