From 734e62140a23f171253512add97827e75e49bbe2 Mon Sep 17 00:00:00 2001 From: jidong Date: Tue, 27 Dec 2022 10:13:13 +0800 Subject: [PATCH] remove ohos.permission.GET_ALL_APP_ACCOUNTS for getAllAccounts and getAccountsByOwn Signed-off-by: jidong Change-Id: Ic0dbc3f7186fddb3a76b9adba538eb4ce7eed928 --- api/@ohos.account.appAccount.d.ts | 4 -- api/@ohos.account.osAccount.d.ts | 67 +++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index 2d4f53cb36..c1490aa5be 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -384,9 +384,7 @@ declare namespace appAccount { *
  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS * @returns Returns a list of application accounts. - * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. * @since 9 @@ -422,10 +420,8 @@ declare namespace appAccount { *
  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS * @param owner Indicates the account owner of your application or third-party applications. * @returns Returns a list of application accounts. - * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. * @throws {BusinessError} 12300002 - invalid owner. diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index 574bbda913..8d4c209e3b 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -1054,7 +1054,7 @@ declare namespace osAccount { * Provides the management of credential inputers. * @name InputerManager * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since 9 */ class InputerManager { /** @@ -1070,9 +1070,9 @@ declare namespace osAccount { * @throws {BusinessError} 12300103 - the credential inputer has been registered. * @throws {BusinessError} 12300106 - unsupported authType. * @systemapi Hide this for inner system use. - * @since 10 + * @since 9 */ - registerInputer(authType: AuthType, inputer: IInputer): void; + static registerInputer(authType: AuthType, inputer: IInputer): void; /** * Unregister credential inputer by authentication type. @@ -1083,9 +1083,62 @@ declare namespace osAccount { * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300002 - invalid authType. * @systemapi Hide this for inner system use. - * @since 10 + * @since 9 */ - unregisterInputer(authType: AuthType): void; + static unregisterInputer(authType: AuthType): void; + } + + /** + * Provides the definition of domain plugin. + * + * @name DomainPlugin + * @syscap SystemCapability.Account.OsAccount + * @since 9 + */ + interface DomainPlugin { + /** + * Authenticates the specified domain account. + * + * @param domainAccountInfo Indicates the domain account information for authentication. + * @param credential Indicates the credential for authentication. + * @param callback Indicates the authentication callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUserAuthCallback): void; + } + + /** + * Provides abilities for the management of domain account. + * @name DomainAccountManager + * @syscap SystemCapability.Account.OsAccount + * @since 9 + */ + class DomainAccountManager { + /** + * Registers the domain plugin, which provides the capabilities for domain authentication. + * + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @param plugin Indicates the domain plugin. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - not system application. + * @throws {BusinessError} 401 - the parameter check failed. + * @throws {BusinessError} 12300104 - the domain plugin has been registered. + * @systemapi Hide this for inner system use. + * @since 9 + */ + static registerPlugin(plugin: DomainPlugin): void; + + /** + * Unregister domain plugin. + * + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - not system application. + * @systemapi Hide this for inner system use. + * @since 9 + */ + static unregisterPlugin(): void; } /** @@ -1565,7 +1618,7 @@ declare namespace osAccount { /** * Indicates the DOMAIN authentication type. - * @since 10 + * @since 9 */ DOMAIN = 1024 } @@ -1605,7 +1658,7 @@ declare namespace osAccount { /** * Indicates the mixed domain credential. - * @since 10 + * @since 9 */ DOMAIN_MIXED = 10240001 } -- Gitee