feat(@desktop/keycard): `keycardUid` pram added to user authenticated signal
This commit is contained in:
parent
0a04e1a67c
commit
87a4300e46
|
@ -372,7 +372,8 @@ proc init*(self: Controller) =
|
||||||
let data = SharedKeycarModuleArgs(uniqueIdentifier: self.authenticateUserFlowRequestedBy,
|
let data = SharedKeycarModuleArgs(uniqueIdentifier: self.authenticateUserFlowRequestedBy,
|
||||||
password: args.password,
|
password: args.password,
|
||||||
pin: args.pin,
|
pin: args.pin,
|
||||||
keyUid: args.keyUid)
|
keyUid: args.keyUid,
|
||||||
|
keycardUid: args.keycardUid)
|
||||||
self.authenticateUserFlowRequestedBy = ""
|
self.authenticateUserFlowRequestedBy = ""
|
||||||
self.events.emit(SIGNAL_SHARED_KEYCARD_MODULE_USER_AUTHENTICATED, data)
|
self.events.emit(SIGNAL_SHARED_KEYCARD_MODULE_USER_AUTHENTICATED, data)
|
||||||
|
|
||||||
|
|
|
@ -582,6 +582,7 @@ proc terminateCurrentFlow*(self: Controller, lastStepInTheCurrentFlow: bool) =
|
||||||
self.tmpFlowData.password = exportedEncryptionPubKey
|
self.tmpFlowData.password = exportedEncryptionPubKey
|
||||||
self.tmpFlowData.pin = self.getPin()
|
self.tmpFlowData.pin = self.getPin()
|
||||||
self.tmpFlowData.keyUid = flowEvent.keyUid
|
self.tmpFlowData.keyUid = flowEvent.keyUid
|
||||||
|
self.tmpFlowData.keycardUid = flowEvent.instanceUID
|
||||||
else:
|
else:
|
||||||
self.tmpFlowData.password = self.getPassword()
|
self.tmpFlowData.password = self.getPassword()
|
||||||
self.tmpFlowData.keyUid = singletonInstance.userProfile.getKeyUid()
|
self.tmpFlowData.keyUid = singletonInstance.userProfile.getKeyUid()
|
||||||
|
|
|
@ -23,7 +23,7 @@ const SIGNAL_SHARED_KEYCARD_MODULE_KEYCARD_SYNC_TERMINATED* = "sharedKeycarModul
|
||||||
## and props there will be emitted:
|
## and props there will be emitted:
|
||||||
## -- `uniqueIdentifier` - will be the same as one used for running authentication process
|
## -- `uniqueIdentifier` - will be the same as one used for running authentication process
|
||||||
## -- in case of success of a regular user authentication `keyUid`, `password` will be sent, otherwise it will be empty
|
## -- in case of success of a regular user authentication `keyUid`, `password` will be sent, otherwise it will be empty
|
||||||
## -- in case of success of a keycard user authentication `keyUid`, `pin` and `password` will be sent, otherwise they will be empty
|
## -- in case of success of a keycard user authentication `keycardUid`, `keyUid`, `pin` and `password` will be sent, otherwise they will be empty
|
||||||
##
|
##
|
||||||
## TLDR: when you need to authenticate user, from the module where it's needed you have to send `SIGNAL_SHARED_KEYCARD_MODULE_AUTHENTICATE_USER`
|
## TLDR: when you need to authenticate user, from the module where it's needed you have to send `SIGNAL_SHARED_KEYCARD_MODULE_AUTHENTICATE_USER`
|
||||||
## signal to run authentication process and connect to `SIGNAL_SHARED_KEYCARD_MODULE_USER_AUTHENTICATED` signal to get the results of it.
|
## signal to run authentication process and connect to `SIGNAL_SHARED_KEYCARD_MODULE_USER_AUTHENTICATED` signal to get the results of it.
|
||||||
|
@ -37,6 +37,7 @@ type
|
||||||
password*: string
|
password*: string
|
||||||
pin*: string # this is used in case we need to run another keycard flow which requires pin, after we successfully authenticated logged in user
|
pin*: string # this is used in case we need to run another keycard flow which requires pin, after we successfully authenticated logged in user
|
||||||
keyUid*: string
|
keyUid*: string
|
||||||
|
keycardUid*: string
|
||||||
|
|
||||||
type
|
type
|
||||||
SharedKeycarModuleFlowTerminatedArgs* = ref object of SharedKeycarModuleArgs
|
SharedKeycarModuleFlowTerminatedArgs* = ref object of SharedKeycarModuleArgs
|
||||||
|
|
Loading…
Reference in New Issue