Whenever under any law of this State, or under the provisions of any ordinance, resolution or order, bonds of any public body are required or permitted to be signed or countersigned manually by any public officer who is permitted by law to have a deputy, such bonds may be signed or countersigned on behalf of such officer by any deputy of such officer who has been authorized by such officer in writing so to sign or countersign.