From dc0a588c695598a676d43519e8fdeee3bdceed2e Mon Sep 17 00:00:00 2001 From: baiwei Date: Thu, 16 Jun 2022 14:23:31 +0800 Subject: [PATCH] fix interface bug Signed-off-by: baiwei Change-Id: I72b13d31d9f87ed87c849adeaf3630fcaf971ce6 --- user_auth/v1_0/IUserAuthInterface.idl | 11 ++++--- user_auth/v1_0/UserAuthTypes.idl | 47 ++++++++++++++++++++------- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/user_auth/v1_0/IUserAuthInterface.idl b/user_auth/v1_0/IUserAuthInterface.idl index 5c42d7e6..b9b27aa2 100644 --- a/user_auth/v1_0/IUserAuthInterface.idl +++ b/user_auth/v1_0/IUserAuthInterface.idl @@ -155,16 +155,18 @@ interface IUserAuthInterface { */ GetCredential([in] int userId, [in] enum AuthType authType, [out] struct CredentialInfo[] infos); /** - * @brief Query secure information. + * @brief Query user information. * * @param userId Indicates user id. * @param secureUid Indicates secure user id. + * @param pinSubType Indicates pin auth's subtype, see {@link PinSubType}. * @param infos Indicates enrolled Info, see {@link EnrolledInfo}. * * @return Returns 0 if the operation is successful. * @return Returns a non-zero value if the operation fails. */ - GetSecureInfo([in] int userId, [out] unsigned long secureUid, [out] struct EnrolledInfo[] infos); + GetUserInfo([in] int userId, [out] unsigned long secureUid, [out] enum PinSubType pinSubType, + [out] struct EnrolledInfo[] infos); /** * @brief Delete pin, delete user in Iam subsystem. * @@ -224,13 +226,14 @@ interface IUserAuthInterface { * * @param contextId Indicates context id. * @param authType Indicates identification type, see @{AuthType}. + * @param executorSensorHint Indicates executor sensor hint, 0 indicates that no value is specified. * @param scheduleInfo Indicates scheduling information, see {@link ScheduleInfo}. * * @return Returns 0 if the operation is successful. * @return Returns a non-zero value if the operation fails. */ - BeginIdentification([in] unsigned long contextId, [in] enum AuthType authType, [in] byte[] challenge, - [in] unsigned int executorId, [out] struct ScheduleInfo scheduleInfo); + BeginIdentification([in] unsigned long contextId, [in] enum AuthType authType, [in] unsigned char[] challenge, + [in] unsigned int executorSensorHint, [out] struct ScheduleInfo scheduleInfo); /** * @brief Update identification result, and evaluate the results of this identification scheme. * diff --git a/user_auth/v1_0/UserAuthTypes.idl b/user_auth/v1_0/UserAuthTypes.idl index 89a36eff..dd30d87c 100644 --- a/user_auth/v1_0/UserAuthTypes.idl +++ b/user_auth/v1_0/UserAuthTypes.idl @@ -65,17 +65,41 @@ enum ExecutorSecureLevel : int { ESL3 = 3, /**< Indicates executor secure level is ESL3. */ }; +/** + * Pin auth's subtype. + * + * @since 3.2 + * @version 1.0 + */ +enum PinSubType : int { + PIN_SIX = 10000, /**< Indicates 6 digit pin. */ + PIN_NUMBER = 10001, /**< Indicates digit pin. */ + PIN_MIX = 10002, /**< Indicates mixing pin. */ +}; + +/** + * Schedule mode. + * + * @since 3.2 + * @version 1.0 + */ +enum ScheduleMode : int { + ENROLL = 0, /**< Indicates schedule mode is enrollment. */ + AUTH = 1, /**< Indicates schedule mode is authentication. */ + IDENTIFY = 2, /**< Indicates schedule mode is identification. */ +}; + struct ExecutorRegisterInfo { enum AuthType authType; /**< Indicates authentication type, see @{AuthType}. */ enum ExecutorRole executorRole; /**< Indicates executor role, see @{ExecutorRole}. */ - unsigned int executorId; /**< Indicates executor id under the same authentication type. */ - unsigned int executorType; /**< Indicates executor type. */ + unsigned int executorSensorHint; /**< Indicates executor sensor hint under the same authentication type, 0 is not allowed. */ + unsigned int executorMatcher; /**< Indicates executor matcher. */ enum ExecutorSecureLevel esl; /**< Indicates executor secure level, see @{ExecutorSecureLevel}. */ unsigned char[] publicKey; /**< Indicates publicKey. */ }; struct ExecutorInfo { - unsigned long index; /**< Indicates executor index under the authentication frameworks. */ + unsigned long executorIndex; /**< Indicates executor index under the authentication frameworks. */ struct ExecutorRegisterInfo info; /**< Indicates executor registration information, see @{ExecutorRegisterInfo}. */ }; @@ -83,8 +107,8 @@ struct ScheduleInfo { unsigned long scheduleId; /**< Indicates schedule id of authentication. */ unsigned long[] templateIds; /**< Indicates the templates to authenticate. */ enum AuthType authType; /**< Indicates authentication type, see @{AuthType}. */ - unsigned int executorType; /**< Indicates executor type. */ - unsigned int scheduleMode; /**< Indicates authentication or identification. */ + unsigned int executorMatcher; /**< Indicates executor matcher. */ + enum ScheduleMode scheduleMode; /**< Indicates schedule mode, see @{ScheduleMode}. */ struct ExecutorInfo[] executors; /**< Indicates executor information, see @{ExecutorInfo}. */ }; @@ -92,12 +116,12 @@ struct AuthSolution { int userId; /**< Indicates user id. */ unsigned int authTrustLevel; /**< Indicates authentication trust level of authentication. */ enum AuthType authType; /**< Indicates authentication type, see @{AuthType}. */ - unsigned int executorId; /**< Indicates executor index under the same authentication type. */ + unsigned int executorSensorHint; /**< Indicates executor sensor hint, 0 indicates that no value is specified. */ unsigned char[] challenge; /**< Indicates challenge of authentication. */ }; struct ExecutorSendMsg { - unsigned int index; /**< Indicates executor index under the authentication frameworks. */ + unsigned long executorIndex; /**< Indicates executor index under the authentication frameworks. */ unsigned char[] msg; /**< Indicates executor msg to send. */ }; @@ -117,17 +141,16 @@ struct IdentifyResultInfo { struct EnrollParam { enum AuthType authType; /**< Indicates authentication type, see @{AuthType}. */ - unsigned int executorType; /**< Indicates executor type. */ - unsigned int executorId; /**< Indicates executor id under the same authentication type. */ + unsigned int executorSensorHint; /**< Indicates executor sensor hint, 0 indicates that no value is specified. */ }; struct CredentialInfo { unsigned long credentialId; /**< Indicates credential Id. */ - unsigned long index; /**< Indicates executor index under the authentication frameworks. */ + unsigned long executorIndex; /**< Indicates executor index under the authentication frameworks. */ unsigned long templateId; /**< Indicates template Id. */ enum AuthType authType; /**< Indicates authentication type, see @{AuthType}. */ - unsigned int executorType; /**< Indicates executor type. */ - unsigned int executorId; /**< Indicates executor id under the same authentication type. */ + unsigned int executorMatcher; /**< Indicates executor matcher. */ + unsigned int executorSensorHint; /**< Indicates executor sensor hint under the same authentication type. */ }; struct EnrolledInfo { -- Gitee