我正在为数字标牌应用程序开发一个“单一应用程序Chrome信息亭”,我已经拥有Chrome设备管理许可证,并希望为每个chrome操作系统远程设置用户名和密码(通过Google Admin通过配置文本文件)显示相应的内容。
从google管理员上传配置文件后,问题从chrome.storage.managed.get('authentication')返回的值为空
我也已经设置了manifest.json和schema.json并从google admin上传了配置文件
manifest.json中的是
"storage": {
"managed_schema": "schema.json"
}
schema.json
{
"type": "object",
"properties": {
"authentication": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
}
}
}
,上传的配置文件如下
{
"authentication": {
"Value": {
"username": {
"Value": "testScreen"
},
"password": {
"Value": "test1234$"
}
}
}
}
和我的读取代码
chrome.storage.managed.get('authentication', function (data) {
const credentials = {
username: data.username,
password: data.password
};
});
我希望将响应数据作为对象 数据= {用户名:'testScreen',密码:'test123 $'}
我实际上得到的是data = {};空对象。