MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / twoFactorValidateMessage

Method twoFactorValidateMessage

keepercommander/loginv3.py:1038–1060  ·  view source on GitHub ↗
(params,                   # type: KeeperParams
                                 encryptedLoginToken,      # type: bytes
                                 otp_code,                 # type: str
                                 *,
                                 tfa_expire_in=None,       # type: Any
                                 twoFactorValueType=None,  # type: Any
                                 channel_uid=None          # type: Any
                                 )

Source from the content-addressed store, hash-verified

1036
1037 @staticmethod
1038 def twoFactorValidateMessage(params, # type: KeeperParams
1039 encryptedLoginToken, # type: bytes
1040 otp_code, # type: str
1041 *,
1042 tfa_expire_in=None, # type: Any
1043 twoFactorValueType=None, # type: Any
1044 channel_uid=None # type: Any
1045 ): # type: (...) -> Optional[bytes]
1046
1047 rq = APIRequest_pb2.TwoFactorValidateRequest()
1048 rq.encryptedLoginToken = encryptedLoginToken
1049 rq.value = otp_code
1050 if twoFactorValueType:
1051 rq.valueType = twoFactorValueType
1052 if channel_uid:
1053 rq.channel_uid = channel_uid
1054 if tfa_expire_in:
1055 rq.expireIn = tfa_expire_in
1056
1057 rs = api.communicate_rest(params, rq, 'authentication/2fa_validate',
1058 rs_type=APIRequest_pb2.TwoFactorValidateResponse)
1059 if rs:
1060 return rs.encryptedLoginToken
1061
1062 @staticmethod
1063 def twoFactorSend2FAPushMessage(params: KeeperParams,

Callers 2

send_codeMethod · 0.80
verifyDeviceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected