def get_enrollment_status(self): """ provide token enrollment status""" is_completely_finished = TokenClass.isActive(self) if is_completely_finished: return {'status': 'completed'} else: return {'status': 'not completed', 'detail': self.current_state}
def get_enrollment_status(self): """ provide token enrollment status""" is_completely_finished = TokenClass.isActive(self) if is_completely_finished: return {'status': 'completed'} else: return {'status': 'not completed', 'detail': self.current_state}
def isActive(self): # overwritten, because QrTokenClass can receive validate # requests in 2 different states: pairing_finished (active # flag is 1) and pairing_challenge_sent (active flag is 0) is_completely_finished = TokenClass.isActive(self) return is_completely_finished or \ self.current_state == 'pairing_response_received' or \ self.current_state == 'pairing_challenge_sent'
def isActive(self): # overwritten, because PushTokenClass can receive validate # requests in 3 different states: active (active flag is 1) # pairing_response_received and pairing_challenge_sent # (both with active flag 0) is_completely_finished = TokenClass.isActive(self) return is_completely_finished or \ self.current_state == 'pairing_response_received' or \ self.current_state == 'pairing_challenge_sent'
def isActive(self): # overwritten, because PushTokenClass can receive validate # requests in 3 different states: active (active flag is 1) # pairing_response_received and pairing_challenge_sent # (both with active flag 0) is_completely_finished = TokenClass.isActive(self) return is_completely_finished or \ self.current_state == 'pairing_response_received' or \ self.current_state == 'pairing_challenge_sent'