(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
)
| 1027 | |
| 1028 | @staticmethod |
| 1029 | def twoFactorValidateMessage(params, # type: KeeperParams |
| 1030 | encryptedLoginToken, # type: bytes |
| 1031 | otp_code, # type: str |
| 1032 | *, |
| 1033 | tfa_expire_in=None, # type: Any |
| 1034 | twoFactorValueType=None, # type: Any |
| 1035 | channel_uid=None # type: Any |
| 1036 | ): # type: (...) -> Optional[bytes] |
| 1037 | |
| 1038 | rq = APIRequest_pb2.TwoFactorValidateRequest() |
| 1039 | rq.encryptedLoginToken = encryptedLoginToken |
| 1040 | rq.value = otp_code |
| 1041 | if twoFactorValueType: |
| 1042 | rq.valueType = twoFactorValueType |
| 1043 | if channel_uid: |
| 1044 | rq.channel_uid = channel_uid |
| 1045 | if tfa_expire_in: |
| 1046 | rq.expireIn = tfa_expire_in |
| 1047 | |
| 1048 | rs = api.communicate_rest(params, rq, 'authentication/2fa_validate', |
| 1049 | rs_type=APIRequest_pb2.TwoFactorValidateResponse) |
| 1050 | if rs: |
| 1051 | return rs.encryptedLoginToken |
| 1052 | |
| 1053 | @staticmethod |
| 1054 | def twoFactorSend2FAPushMessage(params: KeeperParams, |
no outgoing calls
no test coverage detected