在没有主密钥的情况下访问 Android 中的 Parse 服务器不会获得授权
Accessing the Parse server in Android without a master key doesn't give authorization
当我使用以下命令访问我的服务器时,它起作用了:
curl -X POST \
-H "X-Parse-Application-Id: xxx" \
-H "X-Parse-Master-Key: yyy" \
-H "Content-Type: text/plain" \
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
http://xx.xx.xx.xx/parse/classes/Inventory
但是当我使用以下内容时,它不会:
curl -X POST \
-H "X-Parse-Application-Id: xxx" \
-H "Content-Type: text/plain" \
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
http://xx.xx.xx.xx/parse/classes/Inventory
我得到的是这个错误:
{"error":"unauthorized"}
它之前工作得很好。我更改了一些设置并更新到最新的 Parse Server 版本,然后它停止工作,以及与之相关的所有其他应用程序。
网页版有效,提示REST API键没问题。我也可以通过仪表板完美访问所有内容。唯一的问题是当我使用 Android 访问它时,它只能给出一个应用程序 ID 以供识别。
可能是我更改了阻止此设置的错误设置?我认为我没有更改任何内容,尽管有很小的可能性我没有关闭括号或在 server.js 文件中注释掉某些内容。
这里提到了:https://github.com/parse-community/parse-server
The client keys used with Parse are no longer necessary with Parse Server. If you wish to still require them, perhaps to be able to refuse access to older clients, you can set the keys at initialization time. Setting any of these keys will require all requests to provide one of the configured keys.
- clientKey
- javascriptKey
- restAPIKey
- dotNetKey
发生的事情是我的配置文件中有 restAPIKey
,所以它也需要其他四个键中的任何一个。新更新强制我的应用使用 clientKey
或从配置中删除 restAPIKey
。
当我使用以下命令访问我的服务器时,它起作用了:
curl -X POST \
-H "X-Parse-Application-Id: xxx" \
-H "X-Parse-Master-Key: yyy" \
-H "Content-Type: text/plain" \
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
http://xx.xx.xx.xx/parse/classes/Inventory
但是当我使用以下内容时,它不会:
curl -X POST \
-H "X-Parse-Application-Id: xxx" \
-H "Content-Type: text/plain" \
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
http://xx.xx.xx.xx/parse/classes/Inventory
我得到的是这个错误:
{"error":"unauthorized"}
它之前工作得很好。我更改了一些设置并更新到最新的 Parse Server 版本,然后它停止工作,以及与之相关的所有其他应用程序。
网页版有效,提示REST API键没问题。我也可以通过仪表板完美访问所有内容。唯一的问题是当我使用 Android 访问它时,它只能给出一个应用程序 ID 以供识别。
可能是我更改了阻止此设置的错误设置?我认为我没有更改任何内容,尽管有很小的可能性我没有关闭括号或在 server.js 文件中注释掉某些内容。
这里提到了:https://github.com/parse-community/parse-server
The client keys used with Parse are no longer necessary with Parse Server. If you wish to still require them, perhaps to be able to refuse access to older clients, you can set the keys at initialization time. Setting any of these keys will require all requests to provide one of the configured keys.
- clientKey
- javascriptKey
- restAPIKey
- dotNetKey
发生的事情是我的配置文件中有 restAPIKey
,所以它也需要其他四个键中的任何一个。新更新强制我的应用使用 clientKey
或从配置中删除 restAPIKey
。