Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3f68ba5b
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3f68ba5b
编写于
4月 27, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
!17643 fix demo code problem
Merge pull request !17643 from jidong/dev042501
上级
e8354c5f
74ff9522
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
20 deletion
+22
-20
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
+22
-20
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-osAccount.md
浏览文件 @
3f68ba5b
...
...
@@ -4437,12 +4437,12 @@ auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUs
});
},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
);
...
...
@@ -4492,12 +4492,12 @@ authWithPopup(domainAccountInfo: DomainAccountInfo, callback: IUserAuthCallback)
freezingTime
:
0
});
},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
...
@@ -4526,7 +4526,7 @@ authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback:
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{
// mock authentication
// notify authentication result
callback
.
onResult
(
0
,
{
...
...
@@ -4539,7 +4539,7 @@ authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback:
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
...
@@ -4568,7 +4568,7 @@ getAccountInfo(domain: string, accountName: string, callback: AsyncCallback<D
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{
// mock getting account information
// notify result
...
...
@@ -4583,7 +4583,7 @@ getAccountInfo(domain: string, accountName: string, callback: AsyncCallback<D
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
...
@@ -4611,7 +4611,7 @@ getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{
callback
({
...
...
@@ -4623,7 +4623,7 @@ getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&
},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
...
@@ -4651,7 +4651,7 @@ bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: Asy
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{
...
...
@@ -4660,7 +4660,7 @@ bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: Asy
callback
({
code
:
0
})
},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
...
@@ -4688,7 +4688,7 @@ unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<v
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
...
...
@@ -4697,7 +4697,7 @@ unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<v
// notify unbinding result
callback
({
code
:
0
})
},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
)
...
...
@@ -4726,12 +4726,12 @@ isAccountTokenValid(domainAccountInfo: DomainAccountInfo, token: Uint8Array, cal
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{
// mock checking operation
// notify checking result
callback
({
code
:
0
},
true
);
...
...
@@ -4763,12 +4763,12 @@ getAccessToken(options: GetDomainAccessTokenOptions, callback: AsyncCallback<
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{
// mock getting operation
let
token
=
new
Uint8Array
([
0
]);
...
...
@@ -4811,11 +4811,13 @@ static registerPlugin(plugin: DomainPlugin): void
let
plugin
=
{
auth
:
(
domainAccountInfo
,
credential
,
callback
)
=>
{},
authWithPopup
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
callback
)
=>
{},
authWithToken
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccountInfo
:
(
domain
,
accountName
,
callback
)
=>
{},
getAuthStatusInfo
:
(
domainAccountInfo
,
callback
)
=>
{},
bindAccount
:
(
domainAccountInfo
,
localId
,
callback
)
=>
{},
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{}
unbindAccount
:
(
domainAccountInfo
,
callback
)
=>
{},
isAccountTokenValid
:
(
domainAccountInfo
,
token
,
callback
)
=>
{},
getAccessToken
:
(
options
,
callback
)
=>
{}
}
try
{
account_osAccount
.
DomainAccountManager
.
registerPlugin
(
plugin
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录