| result | number | Yes | User authentication result. If the operation is successful, **0** is returned. If the operation fails, an error code is returned. For details about the error codes, see [User Authentication Error Codes](../errorcodes/errorcode-useriam.md).|
> **NOTE**<br>You need to use the [UserAuthInstance](#userauthinstance10) instance that has successfully subscribed to the event to call this API to cancel the subscription.
Provides APIs for managing the user authentication widget. You can use the APIs to register the user authentication widget with UserAuthWidgetMgr for management and scheduling.
| type | 'command' | Yes | Event type to subscribe to. **command** indicates the command sent from the user authentication framework to the user authentication widget.|
| callback | [IAuthWidgetCallback](#iauthwidgetcallback10) | Yes | Callback invoked to send the command from the user authentication framework to the user authentication widget.|
**Error codes**
For details about the error codes, see [User Authentication Error Codes](../errorcodes/errorcode-useriam.md).
| type | 'command' | Yes | Event type to unsubscribe from. **command** indicates the command sent from the user authentication framework to the user authentication widget.|
| callback | [IAuthWidgetCallback](#iauthwidgetcallback10) | No | Callback for the command sent from the user authentication framework to the user authentication widget.|
**Error codes**
For details about the error codes, see [User Authentication Error Codes](../errorcodes/errorcode-useriam.md).
> This API is supported since API version 9 and deprecated since API version 10.
> This API is supported since API version 9.
> **NOTE**<br>
> **NOTE**<br>
> Use the [AuthInstance](#authinstancedeprecated) instance obtained to invoke this API. The [AuthInstance](#authinstancedeprecated) instance must be the instance being authenticated.
> Use the [AuthInstance](#authinstance9) instance obtained to invoke this API. The [AuthInstance](#authinstance9) instance must be the instance being authenticated.
Obtains an **AuthInstance** instance for user authentication.
Obtains an **AuthInstance** instance for user authentication.
> **NOTE**<br>
> **NOTE**<br>
> This API is supported since API version 9 and deprecated since API version 10. Use [getUserAuthInstance](#useriam_userauthgetuserauthinstance10) instead.
> This API is supported since API version 9.
> **NOTE**<br>
> **NOTE**<br>
> An **AuthInstance** instance can be used for an authentication only once.
> An **AuthInstance** instance can be used for an authentication only once.
...
@@ -1055,7 +390,7 @@ Obtains an **AuthInstance** instance for user authentication.
...
@@ -1055,7 +390,7 @@ Obtains an **AuthInstance** instance for user authentication.
@@ -1146,7 +481,6 @@ Enumerates the authentication result codes.
...
@@ -1146,7 +481,6 @@ Enumerates the authentication result codes.
| BUSY | 12500007 | Indicates the busy state. |
| BUSY | 12500007 | Indicates the busy state. |
| LOCKED | 12500009 | The authentication executor is locked. |
| LOCKED | 12500009 | The authentication executor is locked. |
| NOT_ENROLLED | 12500010 | The user has not entered the authentication information.|
| NOT_ENROLLED | 12500010 | The user has not entered the authentication information.|
| CANCELED_FROM_WIDGET | 12500011 | The authentication is canceled by the user from the user authentication widget. If this error code is returned, the authentication is customized by the application.|
## UserAuth<sup>(deprecated)</sup>
## UserAuth<sup>(deprecated)</sup>
...
@@ -1159,7 +493,7 @@ constructor()
...
@@ -1159,7 +493,7 @@ constructor()
A constructor used to create a **UserAuth** instance.
A constructor used to create a **UserAuth** instance.
> **NOTE**<br>
> **NOTE**<br>
> This API is supported since API version 8 and deprecated since API version 9. Use [getAuthInstance](#useriam_userauthgetauthinstancedeprecated) instead.
> This API is supported since API version 8 and deprecated since API version 9. Use [getAuthInstance](#useriam_userauthgetauthinstance9) instead.