Extracted a SecureListener out of AllowListener.