WifiDog 认证协议研究之 Auth Server
2016-04-05 15:52
417 查看
认证流程如下图:
认证流程详解:
1.Login登录(参照 login/index.php)
服务器验证后,Redirect to GW,携带 token
http://$_REQUEST[gw_address]:$_REQUEST[gw_port]/wifidog/auth?token=$token
2.Validation of ID
服务器返回 Status
Auth: 1
Messages: | 认证信息(如错误之类的消息)
common.php中有如下定义:
/* Constant shared with the gateway
NEVER edit these, as they mush match the C code of the gateway */
define('ACCOUNT_STATUS_ERROR', -1);
define('ACCOUNT_STATUS_DENIED', 0);
define('ACCOUNT_STATUS_ALLOWED', 1);
define('ACCOUNT_STATUS_VALIDATION', 5);
define('ACCOUNT_STATUS_VALIDATION_FAILED', 6);
define('ACCOUNT_STATUS_LOCKED', 254);
auth.h中也有相应定义:
认证流程详解:
1.Login登录(参照 login/index.php)
服务器验证后,Redirect to GW,携带 token
http://$_REQUEST[gw_address]:$_REQUEST[gw_port]/wifidog/auth?token=$token
2.Validation of ID
服务器返回 Status
Auth: 1
Messages: | 认证信息(如错误之类的消息)
common.php中有如下定义:
/* Constant shared with the gateway
NEVER edit these, as they mush match the C code of the gateway */
define('ACCOUNT_STATUS_ERROR', -1);
define('ACCOUNT_STATUS_DENIED', 0);
define('ACCOUNT_STATUS_ALLOWED', 1);
define('ACCOUNT_STATUS_VALIDATION', 5);
define('ACCOUNT_STATUS_VALIDATION_FAILED', 6);
define('ACCOUNT_STATUS_LOCKED', 254);
auth.h中也有相应定义:
/** * @brief Authentication codes returned by auth server. * * Authentication result codes returned by auth_server_request() corresponding * to result code from the central server itself. */ typedef enum { AUTH_ERROR = -1, /**< An error occured during the validation process*/ AUTH_DENIED = 0, /**< Client was denied by the auth server */ AUTH_ALLOWED = 1, /**< Client was granted access by the auth server */ AUTH_VALIDATION = 5, /**< A misnomer. Client is in 15 min probation to validate his new account */ AUTH_VALIDATION_FAILED = 6, /**< Client had X minutes to validate account by email and didn't = too late */ AUTH_LOCKED = 254 /**< Account has been locked */ } t_authcode;
相关文章推荐
- 将key名不带双引号的JSON字符串转换成JSON对象的方法
- XML解析方案
- 让你fork下来的项目与源项目保持同步
- 观察者模式
- Android客户端性能优化
- SAS学习笔记:读取混合格式的数据
- Leetcode 78. Subsets
- Nginx配置文件nginx.conf中文详解(总结)
- javascript异常处理机制
- js遍历jsonTree
- 管理照相机-录视频(摘自Android官方培训课程中文版(v0.9.5))
- Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
- AspectJ(面向切面)
- 重建控制文件
- 关于使用容联demo出现java.lang.NoClassDefFoundError
- 简单数据转化
- Opencv读取多光谱(高光谱)数据(1)
- .Net中的序列化和反序列化详解
- java的优点,java与c++的区别
- 利用DexClassLoader动态加载dex文件