diff --git a/user_auth/v3_0/IUserAuthInterface.idl b/user_auth/v3_0/IUserAuthInterface.idl index e0684cdea828323f7cf6c4bb5b205d336e0ccf5d..6feacf88f3e3a8790d89fd59d8f8945d9dd1dd41 100644 --- a/user_auth/v3_0/IUserAuthInterface.idl +++ b/user_auth/v3_0/IUserAuthInterface.idl @@ -508,5 +508,22 @@ interface IUserAuthInterface { * @version 1.0 */ GetCredentialById([in] unsigned long credentialId, [out] struct CredentialInfo info); + /** + * @brief Verify token and return the plainText. + * + * @param tokenIn Token signed by userAuth. + * @param allowableDuration Allowable duration of token. + * @param tokenPlainOut Token plainText. + * @param rootSecret protection key for the user file key. + * + * @return Returns 0 if the operation is successful. + * @return Returns a non-zero value if the operation fails. + * + * @since 5.1 + * @version 1.0 + */ + VerifyAuthToken([in] unsigned char[] tokenIn, [in] unsigned long allowableDuration, + [out] struct UserAuthTokenPlain tokenPlainOut, [out] unsigned char[] rootSecret); + } /** @} */ diff --git a/user_auth/v3_0/UserAuthTypes.idl b/user_auth/v3_0/UserAuthTypes.idl index b080723a2562a24f68c87301c47d2c4cb9fb3a8e..f82a50bed9f7d60e8535965765074bdb455fee62 100644 --- a/user_auth/v3_0/UserAuthTypes.idl +++ b/user_auth/v3_0/UserAuthTypes.idl @@ -536,4 +536,41 @@ struct GlobalConfigParam { /** Specified authTypes, shouldn't empty. See @{AuthType}.*/ int[] authTypes; }; + +/** + * @brief User auth token plain. + * + * @since 5.1 + * @version 1.0 + */ +struct UserAuthTokenPlain { + /** Token version. */ + unsigned int version; + /** User ID. */ + int userId; + /** Challenge of the token. */ + unsigned char[] challenge; + /** Time interval between token signed and verified. */ + unsigned long timeInterval; + /** Authentication trust level. */ + unsigned int authTrustLevel; + /** Authentication type. See @{AuthType}. */ + int authType; + /** Auth mode. */ + int authMode; + /** Security level. */ + unsigned int securityLevel; + /** Token type. */ + int tokenType; + /** SecureUid of the user. */ + unsigned long secureUid; + /** Enrollment ID. */ + unsigned long enrolledId; + /** Credential ID. */ + unsigned long credentialId; + /** Collector udid. */ + String collectorUdid; + /** Verifier udid. */ + String verifierUdid; +}; /** @} */ \ No newline at end of file