def activate_factor()

in okta/AuthClient.py [0:0]


    def activate_factor(self, state_token, factor_id, passcode, relay_state=None):
        """Activate an MFA factor during the auth flow

        :param state_token: current state token from the previous AuthResult
        :type state_token: str
        :param factor_id: target factor id
        :type factor_id: str
        :param passcode: passcode required to activate the factor
        :type passcode: str
        :param relay_state: data that will persist for the lifetime of the authentication or recovery token
        :type relay_state: str or None
        :rtype: AuthResult
        """
        request = {
            'stateToken': state_token,
            'passCode': passcode,
            'relayState': relay_state
        }

        response = ApiClient.post_path(self, '/factors/{0}/lifecycle/activate'.format(factor_id), request)
        return Utils.deserialize(response.text, AuthResult)