Cross-device authentication using target authentication manner method and electronic device
A method includes: a first electronic device that receives a target operation performed by a user on a first interface of the first electronic device for triggering access to a first service, and the first service is associated with a second electronic device. The first electronic device obtains a target authentication manner corresponding to the target operation, acquires authentication information based on the target authentication manner, and sends an authentication request to the second electronic device. The authentication request includes the authentication information and is for requesting the second electronic device to perform authentication on the first service, and the second electronic device generates an authentication result after performing authentication on the first service.
1 . A method implemented by a first electronic device, wherein the method comprises:
providing access, by the first electronic device, to a plurality of services in a second electronic device, the plurality of services including at least a first service and a second service, wherein the first service is different than the second service, and wherein the first electronic device is in communication with the second electronic device;
receiving a target operation performed on a first interface of the first electronic device, wherein the target operation includes triggering access to one of the plurality of services in the second device;
obtaining a target authentication manner, wherein the target authentication manner is one of a first authentication manner corresponding to triggering of the first service or a second authentication manner corresponding to triggering of the second service, wherein the first authentication manner is different than the second authentication manner;
acquiring authentication information based on the target authentication manner; and
sending an authentication request to the second electronic device,
wherein the authentication request comprises the authentication information and is for requesting the second electronic device to perform authentication by the first authentication manner in response to triggering of the first service or by the second authentication manner in response to triggering of the second service.
2 . The method of claim 1 , further comprising:
receiving an authentication result from the second electronic device; and
responding to the target operation based on the authentication result.
3 . The method of claim 1 , further comprising:
receiving an authentication result from the second electronic device; and
switching, in response to the authentication result, from displaying the first interface to displaying a second interface, wherein the second interface comprises a result of triggering one of the first service or the second service.
4 . The method of claim 1 , further comprising performing multi-screen collaboration with the second electronic device, wherein the target operation is performed on a first object in a first window in the first interface, wherein the first window is a display window of the second electronic device.
5 . The method of claim 1 , wherein when the first service is a face unlocking service, the target authentication manner of the face unlocking service is a face authentication, and wherein when the first service is a fingerprint unlocking service, the target authentication manner of the fingerprint unlocking service is a fingerprint authentication.
6 . The method of claim 1 , wherein the target authentication manner is stored in a resource pool, and wherein the resource pool includes a list authentication manners, including the target authentication manner, and corresponding operations in the second electronic device.
7 . A first electronic device comprising:
a memory configured to store instructions; and
one or more processors coupled to the memory and configured to execute the instructions to cause the first electronic device to:
provide access, by the first electronic device, to a plurality of services in a second electronic device, the plurality of services including at least a first service and a second service, wherein the first service is different than the second service, and wherein the first electronic device is in communication with the second electronic device;
receive a target operation performed on a first interface of the first electronic device, wherein the target operation includes triggering access to one of the plurality of services in the second device;
obtain a target authentication manner, wherein the target authentication manner is one of a first authentication manner corresponding to triggering of the first service or a second authentication manner corresponding to triggering of the second service, wherein the first authentication manner is different than the second authentication manner;
acquire authentication information based on the target authentication manner; and
send an authentication request to the second electronic device,
wherein the authentication request comprises the authentication information and is for requesting the second electronic device to perform authentication by the first authentication manner in response to triggering of the first service or by the second authentication manner in response to triggering of the second service.
8 . The first electronic device of claim 7 , wherein the one or more processors are further configured to execute the instructions to cause the first electronic device to:
receive an authentication result from the second electronic device; and
respond to the target operation based on the authentication result.
9 . The first electronic device of claim 7 , wherein the one or more processors are further configured to execute the instructions to cause the first electronic device to:
receive an authentication result from the second electronic device; and
switch, in response to the authentication result, from displaying the first interface to displaying a second interface, wherein the second interface comprises a result of triggering one of the first service or the second service.
10 . The first electronic device of claim 7 , wherein the first service and the second service are associated with sensitive data of the second electronic device.
11 . The first electronic device of claim 7 , wherein the one or more processors are further configured to execute the instructions to cause the first electronic device to perform multi-screen collaboration with the second electronic device, wherein the target operation is performed on a first object in a first window in the first interface, wherein the first window is a display window of the second electronic device.
12 . The first electronic device of claim 7 , wherein when the first service is a face unlocking service, the target authentication manner of the face unlocking service is a face authentication, and wherein when the first service is a fingerprint unlocking service, the target authentication manner of the fingerprint unlocking service is a fingerprint authentication.
13 . The first electronic device of claim 7 , wherein the target authentication manner is stored in a resource pool, and wherein the resource pool includes a list authentication manners, including the target authentication manner, and corresponding operations in the second electronic device.
14 . A non-transitory computer readable medium configured to store instructions that, when executed by a processor of an electronic device, cause the electronic device to:
provide access, by the first electronic device, to a plurality of services in a second electronic device, the plurality of services including at least a first service and a second service, wherein the first service is different than the second service, and wherein the first electronic device is in communication with the second electronic device;
receive a target operation performed on a first interface of the first electronic device, wherein the target operation includes triggering access to one of the plurality of services in the second device;
obtain a target authentication manner, wherein the target authentication manner is one of a first authentication manner corresponding to triggering of the first service or a second authentication manner corresponding to triggering of the second service, wherein the first authentication manner is different than the second authentication manner;
acquire authentication information based on the target authentication manner; and
send an authentication request to the second electronic device,
wherein the authentication request comprises the authentication information and is for requesting the second electronic device to perform authentication by the first authentication manner in response to triggering of the first service or by the second authentication manner in response to triggering of the second service.
15 . The non-transitory computer readable medium of claim 14 , wherein the instructions, when executed by the processor of the electronic device, further cause the electronic device to:
receive an authentication result from the second electronic device; and
respond to the target operation based on the authentication result.
16 . The non-transitory computer readable medium of claim 14 , wherein the instructions, when executed by the processor of the electronic device, further cause the electronic device to:
receive an authentication result from the second electronic device; and
switch, in response to the authentication result, from displaying the first interface to displaying a second interface, wherein the second interface comprises a result of triggering the one of the first service or the second service.
17 . The non-transitory computer readable medium of claim 14 , wherein
the first service and the second service are associated with sensitive data of the second electronic device.
18 . The non-transitory computer readable medium of claim 14 , wherein the instructions, when executed by the processor of the electronic device, further cause the electronic device to:
perform multi-screen collaboration with the second electronic device, wherein the target operation is performed on a first object in a first window in the first interface, wherein the first window is a display window of the second electronic device.
19 . The non-transitory computer readable medium of claim 14 , wherein when the first service is a face unlocking service, the target authentication manner of the face unlocking service is a face authentication, and wherein when the first service is a fingerprint unlocking service, the target authentication manner of the fingerprint unlocking service is a fingerprint authentication.
20 . The non-transitory computer readable medium of claim 14 , wherein when the second service is a face unlocking service, the target authentication manner of the face unlocking service is a face authentication, and wherein when the second service is a fingerprint unlocking service, the target authentication manner of the fingerprint unlocking service is a fingerprint authentication.