全部!我将从头开始开发一个 Android stalker 门户客户端应用程序。实际上,我希望该应用程序与包括 Ministra 在内的所有 stalker 服务器兼容,但在这个早期阶段,它只与 Ministra 5.3 兼容是可以的。问题是我找不到任何文档或指南告诉我如何向服务器发布身份验证请求。
这就是我迄今为止研究的所有内容,但它似乎不正确,或者我可能不知道每个参数的含义。
邮政; http://{base_url}/auth/token 授权请求。使用带有附加参数的 OAuth2 密码流
来自表客户端的客户端标识符(示例值)
{
"client_id": "client",
"client_secret": "client_secret",
"grant_type": "password",
"username": "user",
"hw_password": "This is needed field with empty value",
"password": "password",
"mac": 8698576271,
"activation_code": "string",
"meta_1": "Meta 1 for device. Please check with us what data you need to send. Required for get token request.",
"meta_2": "Meta 1 for device. Please check with us what data you need to send. Required for get token request.",
"meta_3": "Meta 1 for device. Please check with us what data you need to send. Required for get token request.",
"refresh_token": "token"
}
成功响应
(示例值)
{
"access_token": "token",
"refresh_token": "refresh_token",
"token_type": "password",
"expires_in": 3600
}
状态码为 200 的默认错误响应(示例值)
{
"error": "Not supported access type",
"code": "server_error",
"error_description": "error message",
"error_uri": "error description"
}
谁能教我?