提交 db77acfd 编写于 作者: L lichenchen

账号docs仓资料错误修改

Signed-off-by: Nlichenchen <lichenchen15@huawei.com>
上级 80856d69
...@@ -4691,10 +4691,16 @@ onResult: (code: number, result?: AuthResult) =&gt; void ...@@ -4691,10 +4691,16 @@ onResult: (code: number, result?: AuthResult) =&gt; void
let appAccountManager = account_appAccount.createAppAccountManager(); let appAccountManager = account_appAccount.createAppAccountManager();
var sessionId = "1234"; var sessionId = "1234";
appAccountManager.getAuthCallback(sessionId).then((callback) => { appAccountManager.getAuthCallback(sessionId).then((callback) => {
var result = {[account_appAccount.Constants.KEY_NAME]: "LiSi", var result = {
[account_appAccount.Constants.KEY_OWNER]: "com.example.accountjsdemo", accountInfo: {
[account_appAccount.Constants.KEY_AUTH_TYPE]: "getSocialData", name: "Lisi",
[account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; owner: "com.example.accountjsdemo",
},
tokenInfo: {
token: "xxxxxx",
authType: "getSocialData"
}
};
callback.onResult(account_appAccount.ResultCode.SUCCESS, result); callback.onResult(account_appAccount.ResultCode.SUCCESS, result);
}).catch((err) => { }).catch((err) => {
console.log("getAuthCallback err: " + JSON.stringify(err)); console.log("getAuthCallback err: " + JSON.stringify(err));
...@@ -4727,9 +4733,16 @@ onRequestRedirected: (request: Want) =&gt; void ...@@ -4727,9 +4733,16 @@ onRequestRedirected: (request: Want) =&gt; void
} }
auth(name, authType, options, callback) { auth(name, authType, options, callback) {
var result = {[account_appAccount.Constants.KEY_NAME]: name, var result = {
[account_appAccount.Constants.KEY_AUTH_TYPE]: authType, accountInfo: {
[account_appAccount.Constants.KEY_TOKEN]: "xxxxxx"}; name: "Lisi",
owner: "com.example.accountjsdemo",
},
tokenInfo: {
token: "xxxxxx",
authType: "getSocialData"
}
};
callback.onResult(account_appAccount.ResultCode.SUCCESS, result); callback.onResult(account_appAccount.ResultCode.SUCCESS, result);
} }
} }
......
...@@ -320,7 +320,7 @@ The auth type is not supported. ...@@ -320,7 +320,7 @@ The auth type is not supported.
请提供系统支持的认证类型。 请提供系统支持的认证类型。
## 12300007 认证类型不存在 ## 12300107 认证类型不存在
**错误信息** **错误信息**
...@@ -335,7 +335,7 @@ The auth type does not exist. ...@@ -335,7 +335,7 @@ The auth type does not exist.
请使用存在的认证类型查询/删除。 请使用存在的认证类型查询/删除。
## 12300008 认证会话不存在 ## 12300108 认证会话不存在
**错误信息** **错误信息**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册